github.com/webonyx/up@v0.7.4-0.20180808230834-91b94e551323/config/errorpages.go (about) 1 package config 2 3 // ErrorPages configuration. 4 type ErrorPages struct { 5 // Disable default error pages. 6 Disable bool `json:"disable"` 7 8 // Dir containing error pages. 9 Dir string `json:"dir"` 10 11 // Variables are passed to the template for use. 12 Variables map[string]interface{} `json:"variables"` 13 } 14 15 // Default implementation. 16 func (e *ErrorPages) Default() error { 17 if e.Dir == "" { 18 e.Dir = "." 19 } 20 21 return nil 22 }