Commit a073c80e authored by Tim Hockin's avatar Tim Hockin

Use newer home for gcfg package

Switch from obsolete "github.com/scalingdata/gcfg" to "gopkg.in/gcfg.v1".
parent 4e29c580
...@@ -356,3 +356,7 @@ speter.net/go/master/NOTICE ...@@ -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
...@@ -885,10 +885,6 @@ ...@@ -885,10 +885,6 @@
"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"
}, },
...@@ -1038,6 +1034,10 @@ ...@@ -1038,6 +1034,10 @@
"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",
"Rev": "20b71e5b60d756d3d2f80def009790325acc2b23" "Rev": "20b71e5b60d756d3d2f80def009790325acc2b23"
......
...@@ -32240,68 +32240,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -32240,68 +32240,6 @@ 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: =
Copyright (c) 2015 Matthew Heon <mheon@redhat.com> Copyright (c) 2015 Matthew Heon <mheon@redhat.com>
...@@ -34113,6 +34051,39 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -34113,6 +34051,39 @@ 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: =
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2012 Péter Surányi. All rights reserved. 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(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 Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
......
Gcfg reads INI-style configuration files into Go structs; Gcfg reads INI-style configuration files into Go structs;
supports user-defined types and subsections. supports user-defined types and subsections.
Project page: https://code.google.com/p/gcfg Package docs: https://godoc.org/gopkg.in/gcfg.v1
Package docs: http://godoc.org/code.google.com/p/gcfg
My other projects: https://speter.net
...@@ -9,8 +9,8 @@ import ( ...@@ -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 ...@@ -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 ( ...@@ -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 ( ...@@ -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 ( ...@@ -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 ...@@ -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 ...@@ -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 ( ...@@ -20,7 +20,7 @@ import (
"io" "io"
"time" "time"
"github.com/scalingdata/gcfg" "gopkg.in/gcfg.v1"
) )
const ( const (
......
...@@ -38,7 +38,7 @@ import ( ...@@ -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"
......
...@@ -40,13 +40,13 @@ import ( ...@@ -40,13 +40,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 ( ...@@ -20,7 +20,7 @@ import (
"io" "io"
"time" "time"
"github.com/scalingdata/gcfg" "gopkg.in/gcfg.v1"
) )
const ( const (
......
...@@ -40,7 +40,7 @@ import ( ...@@ -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 ( ...@@ -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 ( ...@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment