Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code, gofmt and goimports. #19

Merged
merged 1 commit into from
Mar 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}