From fd8b9b122f17abc5d00db771b6863afd42bcc46d Mon Sep 17 00:00:00 2001 From: Liron Levin Date: Tue, 12 Jan 2016 14:17:25 +0200 Subject: [PATCH] Minor fixes go fmt fixes Signed-off-by: Liron Levin --- .travis.yml | 1 - authz/basic.go | 10 +++++----- authz/basic_test.go | 6 +++--- authz/doc.go | 2 +- core/doc.go | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index facfc3d..931c536 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ install: - go get golang.org/x/sys/unix - go get github.com/tools/godep - godep restore -script: - make all services: - docker diff --git a/authz/basic.go b/authz/basic.go index a82c8e3..203a954 100755 --- a/authz/basic.go +++ b/authz/basic.go @@ -199,13 +199,13 @@ func (f *basicAuditor) AuditRequest(req *authorization.Request, pluginRes *autho fields := logrus.Fields{ "method": req.RequestMethod, - "uri": req.RequestURI, - "user": req.User, - "allow": pluginRes.Allow, - "msg": pluginRes.Msg, + "uri": req.RequestURI, + "user": req.User, + "allow": pluginRes.Allow, + "msg": pluginRes.Msg, } - if pluginRes != nil ||pluginRes.Err != "" { + if pluginRes != nil || pluginRes.Err != "" { fields["err"] = pluginRes.Err } diff --git a/authz/basic_test.go b/authz/basic_test.go index 522e24c..be60283 100755 --- a/authz/basic_test.go +++ b/authz/basic_test.go @@ -46,9 +46,9 @@ func TestPolicyApply(t *testing.T) { func TestAuditRequest(t *testing.T) { auditor := NewBasicAuditor() - auditor.AuditRequest(&authorization.Request{User:"user"}, &authorization.Response{Allow:true}) - auditor.AuditRequest(&authorization.Request{User:"user"}, nil) + auditor.AuditRequest(&authorization.Request{User: "user"}, &authorization.Response{Allow: true}) + auditor.AuditRequest(&authorization.Request{User: "user"}, nil) auditor.AuditRequest(nil, &authorization.Response{ - Err:"err", + Err: "err", }) } diff --git a/authz/doc.go b/authz/doc.go index 6df4658..c09644b 100644 --- a/authz/doc.go +++ b/authz/doc.go @@ -1,4 +1,4 @@ -// authz package consist of specific authorization and auditing implementations +// Package authz consist of specific authorization and auditing implementations // supported mechanism: // basic authorization - basic policy evaluation based on JSON policy files // basic auditing - basic auditing to log file (JSON format) - only incoming request is audited diff --git a/core/doc.go b/core/doc.go index cadf83e..4d328ee 100644 --- a/core/doc.go +++ b/core/doc.go @@ -1,3 +1,3 @@ -// core packge consist of common authorization building block required for implementing +// Package core consist of common authorization building block required for implementing // concrete authorization logic. For example, route parsing and plugin service interface. package core