From 36f039a0df33174533d2134e0d81bff3c6bf9987 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 18 Dec 2016 12:36:36 +0000 Subject: [PATCH] export CommandFunc --- config/commands.go | 5 +++-- config/config.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/commands.go b/config/commands.go index d0720b95..80eedd60 100644 --- a/config/commands.go +++ b/config/commands.go @@ -11,10 +11,11 @@ import ( "github.com/mholt/caddy" ) -type commandRunner func(r *http.Request, c *Config, u *User) error +// CommandFunc ... +type CommandFunc func(r *http.Request, c *Config, u *User) error // CommandRunner ... -func CommandRunner(c *caddy.Controller) (commandRunner, error) { +func CommandRunner(c *caddy.Controller) (CommandFunc, error) { fn := func(r *http.Request, c *Config, u *User) error { return nil } args := c.RemainingArgs() diff --git a/config/config.go b/config/config.go index 6b1fa1d3..3db2e40f 100644 --- a/config/config.go +++ b/config/config.go @@ -24,8 +24,8 @@ type Config struct { HugoEnabled bool // Enables the Hugo plugin for File Manager Users map[string]*User WebDavURL string - BeforeSave commandRunner - AfterSave commandRunner + BeforeSave CommandFunc + AfterSave CommandFunc } // AbsoluteURL ...