mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #22486 from thockin/update-gcfg-dep
Auto commit by PR queue bot
This commit is contained in:
commit
8c02a46c4d
4
Godeps/.license_file_state
generated
4
Godeps/.license_file_state
generated
@ -356,3 +356,7 @@ speter.net/go/master/NOTICE
|
|||||||
speter.net/go/master/NOTICE.txt
|
speter.net/go/master/NOTICE.txt
|
||||||
speter.net/go/master/README
|
speter.net/go/master/README
|
||||||
speter.net/go/master/README.md
|
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
|
||||||
|
8
Godeps/Godeps.json
generated
8
Godeps/Godeps.json
generated
@ -920,10 +920,6 @@
|
|||||||
"ImportPath": "github.com/samuel/go-zookeeper/zk",
|
"ImportPath": "github.com/samuel/go-zookeeper/zk",
|
||||||
"Rev": "177002e16a0061912f02377e2dd8951a8b3551bc"
|
"Rev": "177002e16a0061912f02377e2dd8951a8b3551bc"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"ImportPath": "github.com/scalingdata/gcfg",
|
|
||||||
"Rev": "37aabad69cfd3d20b8390d902a8b10e245c615ff"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/seccomp/libseccomp-golang",
|
"ImportPath": "github.com/seccomp/libseccomp-golang",
|
||||||
"Rev": "1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1"
|
"Rev": "1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1"
|
||||||
@ -1073,6 +1069,10 @@
|
|||||||
"ImportPath": "google.golang.org/grpc",
|
"ImportPath": "google.golang.org/grpc",
|
||||||
"Rev": "933601d8cd6418a8a891bd9075a7161b0a67badb"
|
"Rev": "933601d8cd6418a8a891bd9075a7161b0a67badb"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/gcfg.v1",
|
||||||
|
"Rev": "083575c3955c85df16fe9590cceab64d03f5eb6e"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "gopkg.in/natefinch/lumberjack.v2",
|
"ImportPath": "gopkg.in/natefinch/lumberjack.v2",
|
||||||
"Comment": "v1.0-16-g20b71e5",
|
"Comment": "v1.0-16-g20b71e5",
|
||||||
|
95
Godeps/LICENSES
generated
95
Godeps/LICENSES
generated
@ -33722,68 +33722,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
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: =
|
= Godeps/_workspace/src/github.com/seccomp/libseccomp-golang licensed under: =
|
||||||
|
|
||||||
@ -35595,6 +35533,39 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
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: =
|
= Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2 licensed under: =
|
||||||
|
|
||||||
|
57
Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE
generated
vendored
57
Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE
generated
vendored
@ -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.
|
|
7
Godeps/_workspace/src/github.com/scalingdata/gcfg/README
generated
vendored
7
Godeps/_workspace/src/github.com/scalingdata/gcfg/README
generated
vendored
@ -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
|
|
28
Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE
generated
vendored
Normal file
28
Godeps/_workspace/src/gopkg.in/gcfg.v1/LICENSE
generated
vendored
Normal file
@ -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.
|
4
Godeps/_workspace/src/gopkg.in/gcfg.v1/README
generated
vendored
Normal file
4
Godeps/_workspace/src/gopkg.in/gcfg.v1/README
generated
vendored
Normal file
@ -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
|
@ -9,8 +9,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/scalingdata/gcfg/scanner"
|
"gopkg.in/gcfg.v1/scanner"
|
||||||
"github.com/scalingdata/gcfg/token"
|
"gopkg.in/gcfg.v1/token"
|
||||||
)
|
)
|
||||||
|
|
||||||
var unescape = map[rune]rune{'\\': '\\', '"': '"', 'n': '\n', 't': '\t'}
|
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 {
|
if tok != token.EOL && tok != token.EOF && tok != token.COMMENT {
|
||||||
return errfn("expected EOL, EOF, or 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:
|
case token.IDENT:
|
||||||
if sect == "" {
|
if sect == "" {
|
||||||
return errfn("expected section header")
|
return errfn("expected section header")
|
@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/scalingdata/gcfg/token"
|
"gopkg.in/gcfg.v1/token"
|
||||||
)
|
)
|
||||||
|
|
||||||
// In an ErrorList, an error is represented by an *Error.
|
// In an ErrorList, an error is represented by an *Error.
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
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
|
// An ErrorHandler may be provided to Scanner.Init. If a syntax error is
|
@ -8,7 +8,7 @@ import (
|
|||||||
"unicode"
|
"unicode"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"github.com/scalingdata/gcfg/types"
|
"gopkg.in/gcfg.v1/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tag struct {
|
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: "+
|
return fmt.Errorf("invalid subsection: "+
|
||||||
"section %q subsection %q", sect, sub)
|
"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)
|
vVar, t := fieldFold(vSect, name)
|
||||||
if !vVar.IsValid() {
|
if !vVar.IsValid() {
|
||||||
return fmt.Errorf("invalid variable: "+
|
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
|
// vVal is either single-valued var, or newly allocated value within multi-valued var
|
||||||
var vVal reflect.Value
|
var vVal reflect.Value
|
||||||
// multi-value if unnamed slice type
|
// 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 {
|
if isMulti && blank {
|
||||||
vVar.Set(reflect.Zero(vVar.Type()))
|
vVar.Set(reflect.Zero(vVar.Type()))
|
||||||
return nil
|
return nil
|
@ -20,7 +20,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/scalingdata/gcfg"
|
"gopkg.in/gcfg.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -38,7 +38,7 @@ import (
|
|||||||
"github.com/aws/aws-sdk-go/service/autoscaling"
|
"github.com/aws/aws-sdk-go/service/autoscaling"
|
||||||
"github.com/aws/aws-sdk-go/service/ec2"
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/aws/aws-sdk-go/service/elb"
|
"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/api"
|
||||||
"k8s.io/kubernetes/pkg/cloudprovider"
|
"k8s.io/kubernetes/pkg/cloudprovider"
|
||||||
|
@ -41,13 +41,13 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/util/wait"
|
"k8s.io/kubernetes/pkg/util/wait"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/scalingdata/gcfg"
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"golang.org/x/oauth2/google"
|
"golang.org/x/oauth2/google"
|
||||||
compute "google.golang.org/api/compute/v1"
|
compute "google.golang.org/api/compute/v1"
|
||||||
container "google.golang.org/api/container/v1"
|
container "google.golang.org/api/container/v1"
|
||||||
"google.golang.org/api/googleapi"
|
"google.golang.org/api/googleapi"
|
||||||
"google.golang.org/cloud/compute/metadata"
|
"google.golang.org/cloud/compute/metadata"
|
||||||
|
"gopkg.in/gcfg.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/scalingdata/gcfg"
|
"gopkg.in/gcfg.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -40,7 +40,7 @@ import (
|
|||||||
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools"
|
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools"
|
||||||
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/vips"
|
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/vips"
|
||||||
"github.com/rackspace/gophercloud/pagination"
|
"github.com/rackspace/gophercloud/pagination"
|
||||||
"github.com/scalingdata/gcfg"
|
"gopkg.in/gcfg.v1"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/scalingdata/gcfg"
|
"gopkg.in/gcfg.v1"
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
"k8s.io/kubernetes/pkg/cloudprovider"
|
"k8s.io/kubernetes/pkg/cloudprovider"
|
||||||
)
|
)
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
"github.com/rackspace/gophercloud/pagination"
|
"github.com/rackspace/gophercloud/pagination"
|
||||||
"github.com/rackspace/gophercloud/rackspace"
|
"github.com/rackspace/gophercloud/rackspace"
|
||||||
"github.com/rackspace/gophercloud/rackspace/compute/v2/servers"
|
"github.com/rackspace/gophercloud/rackspace/compute/v2/servers"
|
||||||
"github.com/scalingdata/gcfg"
|
"gopkg.in/gcfg.v1"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
|
Loading…
Reference in New Issue
Block a user