Skip to content

Commit

Permalink
did not realize that a string was a defaultable
Browse files Browse the repository at this point in the history
  • Loading branch information
timball committed Apr 28, 2015
1 parent b569c04 commit cb0fca6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
domain := flag.String("domain", "", "the domain heirarchy to serve (e.g. aws.example.com)")
hostname := flag.String("hostname", "", "the public hostname of this server (e.g. ec2-12-34-56-78.compute-1.amazonaws.com)")
help := flag.Bool("help", false, "show help")
tagname := flag.String("tagname", "", "the tag to use instead of NAME")
tagname := flag.String("tagname", "Name", "the tag to use instead of NAME")

region := flag.String("aws-region", "us-east-1", "The AWS Region")
accessKey := flag.String("aws-access-key-id", "", "The AWS Access Key Id")
Expand All @@ -59,12 +59,6 @@ func main() {
os.Exit(0)
}

if *tagname == "" {
// stupid strings ...
x := "Name"
tagname = &x
}

hostnameFuture := getHostname()

cache, err := NewEC2Cache(*region, *accessKey, *secretKey, *tagname)
Expand Down

1 comment on commit cb0fca6

@timball
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh . you're right . i'm 2hrs new to go . didn't realize strings could have defaults

--timball

Please sign in to comment.