From d2f85569d470859d7f68d89925ea29512c37e4eb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 22 Apr 2015 07:42:37 +0200 Subject: [PATCH] audit: docs --- audit/formatter.go | 2 ++ audit/hashstructure_test.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/audit/formatter.go b/audit/formatter.go index c1f5597f1d..9294d4ed3a 100644 --- a/audit/formatter.go +++ b/audit/formatter.go @@ -9,6 +9,8 @@ import ( // Formatter is an interface that is responsible for formating a // request/response into some format. Formatters write their output // to an io.Writer. +// +// It is recommended that you pass data through Hash prior to formatting it. type Formatter interface { FormatRequest(io.Writer, *logical.Auth, *logical.Request) error FormatResponse(io.Writer, *logical.Auth, *logical.Request, *logical.Response, error) error diff --git a/audit/hashstructure_test.go b/audit/hashstructure_test.go index 790587a10f..67e3da69b5 100644 --- a/audit/hashstructure_test.go +++ b/audit/hashstructure_test.go @@ -41,6 +41,10 @@ func TestHash(t *testing.T) { }, }, }, + { + "foo", + "foo", + }, } for _, tc := range cases {