From a073c80e4564752c3fdc6f90304ad86c2c1bf539 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 3 Mar 2016 16:34:34 -0800 Subject: [PATCH] Use newer home for gcfg package Switch from obsolete "github.com/scalingdata/gcfg" to "gopkg.in/gcfg.v1". --- Godeps/.license_file_state | 4 + Godeps/Godeps.json | 8 +- Godeps/LICENSES | 95 +++++++------------ .../src/github.com/scalingdata/gcfg/LICENSE | 57 ----------- .../src/github.com/scalingdata/gcfg/README | 7 -- .../_workspace/src/gopkg.in/gcfg.v1/LICENSE | 28 ++++++ Godeps/_workspace/src/gopkg.in/gcfg.v1/README | 4 + .../gcfg => gopkg.in/gcfg.v1}/doc.go | 0 .../gcfg => gopkg.in/gcfg.v1}/go1_0.go | 0 .../gcfg => gopkg.in/gcfg.v1}/go1_2.go | 0 .../gcfg => gopkg.in/gcfg.v1}/read.go | 11 ++- .../gcfg.v1}/scanner/errors.go | 2 +- .../gcfg.v1}/scanner/scanner.go | 2 +- .../gcfg => gopkg.in/gcfg.v1}/set.go | 16 +++- .../gcfg.v1}/token/position.go | 0 .../gcfg.v1}/token/serialize.go | 0 .../gcfg => gopkg.in/gcfg.v1}/token/token.go | 0 .../gcfg => gopkg.in/gcfg.v1}/types/bool.go | 0 .../gcfg => gopkg.in/gcfg.v1}/types/doc.go | 0 .../gcfg => gopkg.in/gcfg.v1}/types/enum.go | 0 .../gcfg => gopkg.in/gcfg.v1}/types/int.go | 0 .../gcfg => gopkg.in/gcfg.v1}/types/scan.go | 0 contrib/mesos/pkg/scheduler/config/config.go | 2 +- pkg/cloudprovider/providers/aws/aws.go | 2 +- pkg/cloudprovider/providers/gce/gce.go | 2 +- pkg/cloudprovider/providers/mesos/config.go | 2 +- .../providers/openstack/openstack.go | 2 +- pkg/cloudprovider/providers/ovirt/ovirt.go | 2 +- .../providers/rackspace/rackspace.go | 2 +- 29 files changed, 105 insertions(+), 143 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/scalingdata/gcfg/README create mode 100644 Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE create mode 100644 Godeps/_workspace/src/gopkg.in/gcfg.v1/README rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/doc.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/go1_0.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/go1_2.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/read.go (93%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/scanner/errors.go (98%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/scanner/scanner.go (99%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/set.go (93%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/token/position.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/token/serialize.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/token/token.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/types/bool.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/types/doc.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/types/enum.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/types/int.go (100%) rename Godeps/_workspace/src/{github.com/scalingdata/gcfg => gopkg.in/gcfg.v1}/types/scan.go (100%) diff --git a/Godeps/.license_file_state b/Godeps/.license_file_state index 9b76031491e..243d99cf7d5 100644 --- a/Godeps/.license_file_state +++ b/Godeps/.license_file_state @@ -356,3 +356,7 @@ speter.net/go/master/NOTICE speter.net/go/master/NOTICE.txt speter.net/go/master/README speter.net/go/master/README.md +gopkg.in/gcfg.v1/master/NOTICE +gopkg.in/gcfg.v1/master/NOTICE.txt +gopkg.in/gcfg.v1/master/README +gopkg.in/gcfg.v1/master/README.md diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4463007b48c..50db3f4edb5 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -884,10 +884,6 @@ "ImportPath": "github.com/samuel/go-zookeeper/zk", "Rev": "177002e16a0061912f02377e2dd8951a8b3551bc" }, - { - "ImportPath": "github.com/scalingdata/gcfg", - "Rev": "37aabad69cfd3d20b8390d902a8b10e245c615ff" - }, { "ImportPath": "github.com/seccomp/libseccomp-golang", "Rev": "1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1" @@ -1037,6 +1033,10 @@ "ImportPath": "google.golang.org/grpc", "Rev": "933601d8cd6418a8a891bd9075a7161b0a67badb" }, + { + "ImportPath": "gopkg.in/gcfg.v1", + "Rev": "083575c3955c85df16fe9590cceab64d03f5eb6e" + }, { "ImportPath": "gopkg.in/natefinch/lumberjack.v2", "Comment": "v1.0-16-g20b71e5", diff --git a/Godeps/LICENSES b/Godeps/LICENSES index 9a03da4ec7f..56658dac733 100644 --- a/Godeps/LICENSES +++ b/Godeps/LICENSES @@ -32239,68 +32239,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -================================================================================ -= Godeps/_workspace/src/github.com/scalingdata/gcfg licensed under: = - -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. - - ================================================================================ = Godeps/_workspace/src/github.com/seccomp/libseccomp-golang licensed under: = @@ -34112,6 +34050,39 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +================================================================================ += Godeps/_workspace/src/gopkg.in/gcfg.v1 licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions 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. + + ================================================================================ = Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2 licensed under: = diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE deleted file mode 100644 index b0a9e762ef2..00000000000 --- a/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/scalingdata/gcfg/README b/Godeps/_workspace/src/github.com/scalingdata/gcfg/README deleted file mode 100644 index 8f621c33a61..00000000000 --- a/Godeps/_workspace/src/github.com/scalingdata/gcfg/README +++ /dev/null @@ -1,7 +0,0 @@ -Gcfg reads INI-style configuration files into Go structs; -supports user-defined types and subsections. - -Project page: https://code.google.com/p/gcfg -Package docs: http://godoc.org/code.google.com/p/gcfg - -My other projects: https://speter.net diff --git a/Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE b/Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE new file mode 100644 index 00000000000..87a5cede339 --- /dev/null +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Péter Surányi. Portions 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/gopkg.in/gcfg.v1/README b/Godeps/_workspace/src/gopkg.in/gcfg.v1/README new file mode 100644 index 00000000000..1ff233a529d --- /dev/null +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/README @@ -0,0 +1,4 @@ +Gcfg reads INI-style configuration files into Go structs; +supports user-defined types and subsections. + +Package docs: https://godoc.org/gopkg.in/gcfg.v1 diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/doc.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/doc.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/doc.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/go1_0.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/go1_0.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/go1_0.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/go1_0.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/go1_2.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/go1_2.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/go1_2.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/go1_2.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/read.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/read.go similarity index 93% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/read.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/read.go index 280ec77ec3f..fdfb5f3a2c8 100644 --- a/Godeps/_workspace/src/github.com/scalingdata/gcfg/read.go +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/read.go @@ -9,8 +9,8 @@ import ( ) import ( - "github.com/scalingdata/gcfg/scanner" - "github.com/scalingdata/gcfg/token" + "gopkg.in/gcfg.v1/scanner" + "gopkg.in/gcfg.v1/token" ) var unescape = map[rune]rune{'\\': '\\', '"': '"', 'n': '\n', 't': '\t'} @@ -100,6 +100,13 @@ func readInto(config interface{}, fset *token.FileSet, file *token.File, src []b if tok != token.EOL && tok != token.EOF && tok != token.COMMENT { return errfn("expected EOL, EOF, or comment") } + // If a section/subsection header was found, ensure a + // container object is created, even if there are no + // variables further down. + err := set(config, sect, sectsub, "", true, "") + if err != nil { + return err + } case token.IDENT: if sect == "" { return errfn("expected section header") diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/errors.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/errors.go similarity index 98% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/errors.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/errors.go index e33d656a32c..1a3c0f6563c 100644 --- a/Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/errors.go +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/errors.go @@ -11,7 +11,7 @@ import ( ) import ( - "github.com/scalingdata/gcfg/token" + "gopkg.in/gcfg.v1/token" ) // In an ErrorList, an error is represented by an *Error. diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/scanner.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/scanner.go similarity index 99% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/scanner.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/scanner.go index 462c87eec3e..bbbdbf53541 100644 --- a/Godeps/_workspace/src/github.com/scalingdata/gcfg/scanner/scanner.go +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/scanner/scanner.go @@ -19,7 +19,7 @@ import ( ) import ( - "github.com/scalingdata/gcfg/token" + "gopkg.in/gcfg.v1/token" ) // An ErrorHandler may be provided to Scanner.Init. If a syntax error is diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/set.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/set.go similarity index 93% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/set.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/set.go index 5fa8b7f6e48..7252b689465 100644 --- a/Godeps/_workspace/src/github.com/scalingdata/gcfg/set.go +++ b/Godeps/_workspace/src/gopkg.in/gcfg.v1/set.go @@ -8,7 +8,7 @@ import ( "unicode" "unicode/utf8" - "github.com/scalingdata/gcfg/types" + "gopkg.in/gcfg.v1/types" ) type tag struct { @@ -225,6 +225,11 @@ func set(cfg interface{}, sect, sub, name string, blank bool, value string) erro return fmt.Errorf("invalid subsection: "+ "section %q subsection %q", sect, sub) } + // Empty name is a special value, meaning that only the + // section/subsection object is to be created, with no values set. + if name == "" { + return nil + } vVar, t := fieldFold(vSect, name) if !vVar.IsValid() { return fmt.Errorf("invalid variable: "+ @@ -233,7 +238,14 @@ func set(cfg interface{}, sect, sub, name string, blank bool, value string) erro // vVal is either single-valued var, or newly allocated value within multi-valued var var vVal reflect.Value // multi-value if unnamed slice type - isMulti := vVar.Type().Name() == "" && vVar.Kind() == reflect.Slice + isMulti := vVar.Type().Name() == "" && vVar.Kind() == reflect.Slice || + vVar.Type().Name() == "" && vVar.Kind() == reflect.Ptr && vVar.Type().Elem().Name() == "" && vVar.Type().Elem().Kind() == reflect.Slice + if isMulti && vVar.Kind() == reflect.Ptr { + if vVar.IsNil() { + vVar.Set(reflect.New(vVar.Type().Elem())) + } + vVar = vVar.Elem() + } if isMulti && blank { vVar.Set(reflect.Zero(vVar.Type())) return nil diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/token/position.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/token/position.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/token/position.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/token/position.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/token/serialize.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/token/serialize.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/token/serialize.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/token/serialize.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/token/token.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/token/token.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/token/token.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/token/token.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/types/bool.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/types/bool.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/types/bool.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/types/bool.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/types/doc.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/types/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/types/doc.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/types/doc.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/types/enum.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/types/enum.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/types/enum.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/types/enum.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/types/int.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/types/int.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/types/int.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/types/int.go diff --git a/Godeps/_workspace/src/github.com/scalingdata/gcfg/types/scan.go b/Godeps/_workspace/src/gopkg.in/gcfg.v1/types/scan.go similarity index 100% rename from Godeps/_workspace/src/github.com/scalingdata/gcfg/types/scan.go rename to Godeps/_workspace/src/gopkg.in/gcfg.v1/types/scan.go diff --git a/contrib/mesos/pkg/scheduler/config/config.go b/contrib/mesos/pkg/scheduler/config/config.go index 7b51306629a..563e61e3db3 100644 --- a/contrib/mesos/pkg/scheduler/config/config.go +++ b/contrib/mesos/pkg/scheduler/config/config.go @@ -20,7 +20,7 @@ import ( "io" "time" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" ) const ( diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 15d74e9f74f..88a76c3fdb3 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -38,7 +38,7 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elb" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/cloudprovider" diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index bf458ce8e21..adc1e789a06 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -40,13 +40,13 @@ import ( "k8s.io/kubernetes/pkg/util/wait" "github.com/golang/glog" - "github.com/scalingdata/gcfg" "golang.org/x/oauth2" "golang.org/x/oauth2/google" compute "google.golang.org/api/compute/v1" container "google.golang.org/api/container/v1" "google.golang.org/api/googleapi" "google.golang.org/cloud/compute/metadata" + "gopkg.in/gcfg.v1" ) const ( diff --git a/pkg/cloudprovider/providers/mesos/config.go b/pkg/cloudprovider/providers/mesos/config.go index c1be30e8bd1..9edbc8f5f56 100644 --- a/pkg/cloudprovider/providers/mesos/config.go +++ b/pkg/cloudprovider/providers/mesos/config.go @@ -20,7 +20,7 @@ import ( "io" "time" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" ) const ( diff --git a/pkg/cloudprovider/providers/openstack/openstack.go b/pkg/cloudprovider/providers/openstack/openstack.go index 57378674cd7..b791e8d59fb 100644 --- a/pkg/cloudprovider/providers/openstack/openstack.go +++ b/pkg/cloudprovider/providers/openstack/openstack.go @@ -40,7 +40,7 @@ import ( "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools" "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/vips" "github.com/rackspace/gophercloud/pagination" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" diff --git a/pkg/cloudprovider/providers/ovirt/ovirt.go b/pkg/cloudprovider/providers/ovirt/ovirt.go index 24b47c85284..d2ba03c10ba 100644 --- a/pkg/cloudprovider/providers/ovirt/ovirt.go +++ b/pkg/cloudprovider/providers/ovirt/ovirt.go @@ -29,7 +29,7 @@ import ( "sort" "strings" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/cloudprovider" ) diff --git a/pkg/cloudprovider/providers/rackspace/rackspace.go b/pkg/cloudprovider/providers/rackspace/rackspace.go index fbc0d7bff04..19884381628 100644 --- a/pkg/cloudprovider/providers/rackspace/rackspace.go +++ b/pkg/cloudprovider/providers/rackspace/rackspace.go @@ -29,7 +29,7 @@ import ( "github.com/rackspace/gophercloud/pagination" "github.com/rackspace/gophercloud/rackspace" "github.com/rackspace/gophercloud/rackspace/compute/v2/servers" - "github.com/scalingdata/gcfg" + "gopkg.in/gcfg.v1" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api"