From 139bd8467b78db3ed2d7fa0c4a9d62f3d8c75219 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 7 Sep 2015 23:12:18 -0600 Subject: clean up gofmt differences --- src/nshd/hackers_git/db_config.go | 2 +- src/nshd/hackers_git/hackers.go | 11 ++++++----- src/nshd/hackers_git/hackers_watch.go | 4 ++-- src/nshd/main.go | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/nshd/hackers_git/db_config.go b/src/nshd/hackers_git/db_config.go index 1de0013..55faa18 100644 --- a/src/nshd/hackers_git/db_config.go +++ b/src/nshd/hackers_git/db_config.go @@ -19,7 +19,7 @@ func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) p.Config_En } if val != nil { - return util.New_Config_List([]p.Config{p.Config{Value:(*val)}}) + return util.New_Config_List([]p.Config{p.Config{Value: *val}}) } else { return util.Config_Ø{} } diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go index 2bc2fb2..83ef482 100644 --- a/src/nshd/hackers_git/hackers.go +++ b/src/nshd/hackers_git/hackers.go @@ -22,11 +22,12 @@ type Config struct { type Hackers struct { util.NullBackend - cfg Config - lock sync.RWMutex - workers sync.WaitGroup - users map[int32]user - groups map[string]map[string]bool + cfg Config + lock sync.RWMutex + workers sync.WaitGroup + + users map[int32]user + groups map[string]map[string]bool in_fd *inotify.Inotify in_wd_home inotify.Wd diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go index 2e5eb75..f5029de 100644 --- a/src/nshd/hackers_git/hackers_watch.go +++ b/src/nshd/hackers_git/hackers_watch.go @@ -147,7 +147,7 @@ func (o *Hackers) worker_watch_homedirs() { } func worker_error(format string, a ...interface{}) { - logger.Err("hackers.git: "+ format, a) + logger.Err("hackers.git: "+format, a) os.Exit(int(lsb.EXIT_FAILURE)) } @@ -171,7 +171,7 @@ func (o *Hackers) worker() { worker_error("failed to load %q: %v", o.cfg.Yamldir, err) } } else if event.Mask&in_CHILD_ANY != 0 { - if (event.Name == nil) { + if event.Name == nil { panic("recieved child event from inotify, but no child name") } filename := o.cfg.Yamldir + "/" + *event.Name diff --git a/src/nshd/main.go b/src/nshd/main.go index 3560870..05236b8 100644 --- a/src/nshd/main.go +++ b/src/nshd/main.go @@ -1,10 +1,10 @@ package main import ( - "sd_daemon/lsb" "nshd/hackers_git" "nslcd_systemd" "os" + "sd_daemon/lsb" ) func main() { -- cgit v1.2.2