From f2433d300721bd5bb3c63715661fc88b1863ff26 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 17 Nov 2016 19:08:18 +0100 Subject: fmt --- ip.go | 4 ++-- privsep.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ip.go b/ip.go index 787c511..967d5cf 100644 --- a/ip.go +++ b/ip.go @@ -1,7 +1,7 @@ package main import ( - "fmt" + "io" "net" "net/http" ) @@ -17,5 +17,5 @@ func ip(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - fmt.Fprintln(w, addr) + io.WriteString(w, addr) } diff --git a/privsep.go b/privsep.go index 2bbe91a..9968254 100644 --- a/privsep.go +++ b/privsep.go @@ -4,16 +4,15 @@ package main import ( "errors" - "os/user" - "strconv" "net" "os" + "os/user" "path" + "strconv" "github.com/sarnowski/mitigation" ) - func dropPrivAndListen(userName, sockPath string) (net.Listener, error) { if !mitigation.CanActivate() { return nil, errors.New("cannot drop privileges") -- cgit v1.2.3