Skip to content

Commit

Permalink
Viper handles nested defaults correctly now
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Feb 23, 2017
1 parent 87f21e9 commit a3b09ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
3 changes: 2 additions & 1 deletion audit.go
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"flag"
"fmt"
"github.com/spf13/viper"
"log"
"log/syslog"
"os"
Expand All @@ -15,6 +14,8 @@ import (
"strconv"
"strings"
"syscall"

"github.com/spf13/viper"
)

var l = log.New(os.Stdout, "", 0)
Expand Down
5 changes: 3 additions & 2 deletions audit_test.go
Expand Up @@ -2,8 +2,6 @@ package main

import (
"errors"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"io/ioutil"
"log/syslog"
"net"
Expand All @@ -14,6 +12,9 @@ import (
"syscall"
"testing"
"time"

"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
)

func Test_loadConfig(t *testing.T) {
Expand Down
6 changes: 0 additions & 6 deletions go-audit.yaml.example
@@ -1,9 +1,3 @@
#########################################################################################
# Please note that until this bug https://github.com/spf13/viper/pull/165 is fixed #
# you _must_ specify all values despite the fact that they talk about having a default. #
# Hopefully this problem with viper goes away soon #
#########################################################################################

# Configure socket buffers, leave unset to use the system defaults
# Values will be doubled by the kernel
# It is recommended you do not set any of these values unless you really need to
Expand Down
6 changes: 3 additions & 3 deletions vendor/vendor.json
Expand Up @@ -177,10 +177,10 @@
"revisionTime": "2016-09-11T19:46:38Z"
},
{
"checksumSHA1": "AEhbo+ngM14A/E4LwHOspRTrpJk=",
"checksumSHA1": "cNe3MKwsFLDRzRjKEtOduUiG344=",
"path": "github.com/spf13/viper",
"revision": "16990631d4aa7e38f73dbbbf37fa13e67c648531",
"revisionTime": "2016-08-30T14:32:46Z"
"revision": "7538d73b4eb9511d85a9f1dfef202eeb8ac260f4",
"revisionTime": "2017-02-17T16:38:17Z"
},
{
"checksumSHA1": "iydUphwYqZRq3WhstEdGsbvBAKs=",
Expand Down

0 comments on commit a3b09ab

Please sign in to comment.