summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimportd/main.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-12-31 09:56:21 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-12-31 09:56:21 (GMT)
commit016803268a21b5b341760875ea692c58d185dbda (patch)
tree9bda884d90644233cad969cd12d5fea372c97492 /src/helsinki.at/rhimportd/main.go
parent0ef8fcb03fc4f51b8bc6b1a24f2e964b6a03d50c (diff)
improved coding style
Diffstat (limited to 'src/helsinki.at/rhimportd/main.go')
-rw-r--r--src/helsinki.at/rhimportd/main.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/helsinki.at/rhimportd/main.go b/src/helsinki.at/rhimportd/main.go
index 21c1246..3d5c0b1 100644
--- a/src/helsinki.at/rhimportd/main.go
+++ b/src/helsinki.at/rhimportd/main.go
@@ -41,12 +41,12 @@ var (
)
func main() {
- web_addr_s := flag.String("web-addr", ":4080", "addr:port to listen on")
- telnet_addr_s := flag.String("telnet-addr", ":4023", "addr:port to listen on")
- rdconf_s := flag.String("rdconf", "/etc/rd.conf", "path to the Rivendell config file")
- rdxport_url_s := flag.String("rdxport-url", "http://localhost/rd-bin/rdxport.cgi", "the url to the Rivendell web-api")
- temp_dir_s := flag.String("tmp-dir", os.TempDir(), "path to temporary files")
- local_fetch_dir_s := flag.String("local-fetch-dir", os.TempDir(), "path to files that can be imported using local://")
+ webAddr := flag.String("web-addr", ":4080", "addr:port to listen on")
+ telnetAddr := flag.String("telnet-addr", ":4023", "addr:port to listen on")
+ rdconf := flag.String("rdconf", "/etc/rd.conf", "path to the Rivendell config file")
+ rdxportUrl := flag.String("rdxport-url", "http://localhost/rd-bin/rdxport.cgi", "the url to the Rivendell web-api")
+ tempDir := flag.String("tmp-dir", os.TempDir(), "path to temporary files")
+ localFetchDir := flag.String("local-fetch-dir", os.TempDir(), "path to files that can be imported using local://")
help := flag.Bool("help", false, "show usage")
flag.Parse()
@@ -55,7 +55,7 @@ func main() {
return
}
- conf, err := rhimport.NewConfig(rdconf_s, rdxport_url_s, temp_dir_s, local_fetch_dir_s)
+ conf, err := rhimport.NewConfig(rdconf, rdxportUrl, tempDir, localFetchDir)
if err != nil {
rhl.Println("Error reading configuration:", err)
return
@@ -81,7 +81,7 @@ func main() {
go func() {
defer wg.Done()
rhl.Println("starting web-ctrl")
- StartControlWeb(*web_addr_s, conf, rddb.GetInterface(), sessions.GetInterface())
+ StartControlWeb(*webAddr, conf, rddb.GetInterface(), sessions.GetInterface())
rhl.Println("web-ctrl finished")
}()
@@ -89,7 +89,7 @@ func main() {
go func() {
defer wg.Done()
rhl.Println("starting telnet-ctrl")
- StartControlTelnet(*telnet_addr_s, conf, rddb.GetInterface(), sessions.GetInterface())
+ StartControlTelnet(*telnetAddr, conf, rddb.GetInterface(), sessions.GetInterface())
rhl.Println("telnet-ctrl finished")
}()