Skip to content

Commit

Permalink
Add .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Alexander committed Aug 24, 2015
1 parent ea3395f commit e62b139
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
4 changes: 4 additions & 0 deletions doddns-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
doddns-client
doddns-client.exe
doddns-client.log
token
3 changes: 3 additions & 0 deletions doddns-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
doddns-server
doddns-server.exe
doddns-server.log
24 changes: 12 additions & 12 deletions doddns-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"strings"
)

const (
fportName = "port"
fcertName = "cert"
fkeyName = "key"
const (
fportName = "port"
fcertName = "cert"
fkeyName = "key"
)

// Handler responds a request with its IP address.
Expand All @@ -38,17 +38,17 @@ func flagIsSet(name string) bool {
}

func main() {
fcert := flag.String(fcertName, "", "the TLS certificate to use")
fcert := flag.String(fcertName, "", "the TLS certificate to use")
fkey := flag.String(fkeyName, "", "the TLS key to use")
fport := flag.Uint("port", 18768, "the port to listen on")
flag.Parse()
fcertSet := flagIsSet(fcertName)
fkeySet := flagIsSet(fkeyName)
if fcertSet && !fkeySet {
log.Fatalf("%s set without %s", fcertName, fkeyName)
}
if !fcertSet && fkeySet {
log.Fatalf("%s set without %s", fkeyName, fcertName)
fcertSet := flagIsSet(fcertName)
fkeySet := flagIsSet(fkeyName)
if fcertSet && !fkeySet {
log.Fatalf("%s set without %s", fcertName, fkeyName)
}
if !fcertSet && fkeySet {
log.Fatalf("%s set without %s", fkeyName, fcertName)
}
tls := fcertSet && fkeySet
logFile, err := os.OpenFile(filepath.Base(strings.TrimSuffix(os.Args[0],
Expand Down

0 comments on commit e62b139

Please sign in to comment.