Skip to content

Commit

Permalink
Merge pull request #19 from atlassian/dead_code_fmt
Browse files Browse the repository at this point in the history
Remove dead code, gofmt and goimports.
  • Loading branch information
wolfeidau committed Mar 22, 2016
2 parents 0468e0c + 7b5fb41 commit 8379daa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
9 changes: 4 additions & 5 deletions cmd/unicreds/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"fmt"
"io/ioutil"
"os"
"net/http"
"os"

"github.com/apex/log"
"github.com/apex/log/handlers/cli"
Expand All @@ -19,9 +19,8 @@ const (
)

var (
app = kingpin.New("unicreds", "A credential/secret storage command line tool.")
debug = app.Flag("debug", "Enable debug mode.").Short('d').Bool()
csv = app.Flag("csv", "Enable csv output for table data.").Short('c').Bool()
app = kingpin.New("unicreds", "A credential/secret storage command line tool.")
csv = app.Flag("csv", "Enable csv output for table data.").Short('c').Bool()

region = app.Flag("region", "Configure the AWS region").Short('r').String()

Expand Down Expand Up @@ -169,7 +168,7 @@ func getRegion() (*string, error) {
}

// Strip last char
r := string(contents[0:len(string(contents))-1])
r := string(contents[0 : len(string(contents))-1])
return &r, nil
}

Expand Down
12 changes: 0 additions & 12 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,3 @@ func encodeStruct(name string, val reflect.Value) (map[string]*dynamodb.Attribut

return data, nil
}

func encodePtr(name string, rawVal interface{}) (map[string]*dynamodb.AttributeValue, error) {

val := reflect.ValueOf(rawVal)

valType := val.Elem().Type()
fmt.Printf("val Type %+v\n", valType)

realVal := reflect.New(valType)
reflect.Copy(realVal, reflect.ValueOf(rawVal))
return Encode(realVal)
}

0 comments on commit 8379daa

Please sign in to comment.