mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 12:31:58 +00:00
Nothing special: Linting
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultBasicAuth is "Authorization Required"
|
||||
// DefaultBasicAuthRealm is "Authorization Required"
|
||||
DefaultBasicAuthRealm = "Authorization Required"
|
||||
// DefaultBasicAuthContextKey is the "auth"
|
||||
// this key is used to do context.Set("auth", theUsernameFromBasicAuth)
|
||||
|
||||
@@ -2,6 +2,7 @@ package config
|
||||
|
||||
import "github.com/imdario/mergo"
|
||||
|
||||
// Editor the configs for the Editor plugin
|
||||
type Editor struct {
|
||||
// Host if empty used the iris server's host
|
||||
Host string
|
||||
@@ -34,7 +35,7 @@ func (c Editor) Merge(cfg []Editor) (config Editor) {
|
||||
return
|
||||
}
|
||||
|
||||
// Merge MergeSingle the default with the given config and returns the result
|
||||
// MergeSingle merges the default with the given config and returns the result
|
||||
func (c Editor) MergeSingle(cfg Editor) (config Editor) {
|
||||
|
||||
config = cfg
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/imdario/mergo"
|
||||
)
|
||||
|
||||
// DefaultProfilePath is the default profile(http debug) path which is /debug/pprof
|
||||
const DefaultProfilePath = "/debug/pprof"
|
||||
|
||||
type (
|
||||
@@ -145,7 +146,7 @@ func (c Iris) Merge(cfg []Iris) (config Iris) {
|
||||
return
|
||||
}
|
||||
|
||||
// Merge MergeSingle the default with the given config and returns the result
|
||||
// MergeSingle merges the default with the given config and returns the result
|
||||
func (c Iris) MergeSingle(cfg Iris) (config Iris) {
|
||||
|
||||
config = cfg
|
||||
|
||||
@@ -13,6 +13,7 @@ var (
|
||||
)
|
||||
|
||||
type (
|
||||
// Logger contains the configs for the Logger
|
||||
Logger struct {
|
||||
Out io.Writer
|
||||
Prefix string
|
||||
@@ -20,6 +21,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
// DefaultLogger returns the default configs for the Logger
|
||||
func DefaultLogger() Logger {
|
||||
return Logger{Out: os.Stdout, Prefix: "", Flag: 0}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ var (
|
||||
|
||||
const (
|
||||
// DefaultCookieName the secret cookie's name for sessions
|
||||
DefaultCookieName = "irissessionid"
|
||||
DefaultCookieName = "irissessionid"
|
||||
// DefaultSessionGcDuration is the default Session Manager's GCDuration , which is 2 hours
|
||||
DefaultSessionGcDuration = time.Duration(2) * time.Hour
|
||||
// DefaultRedisNetwork the redis network option, "tcp"
|
||||
DefaultRedisNetwork = "tcp"
|
||||
@@ -97,7 +98,7 @@ func (c Sessions) Merge(cfg []Sessions) (config Sessions) {
|
||||
return
|
||||
}
|
||||
|
||||
// Merge MergeSingle the default with the given config and returns the result
|
||||
// MergeSingle merges the default with the given config and returns the result
|
||||
func (c Sessions) MergeSingle(cfg Sessions) (config Sessions) {
|
||||
|
||||
config = cfg
|
||||
@@ -135,7 +136,7 @@ func (c Redis) Merge(cfg []Redis) (config Redis) {
|
||||
return
|
||||
}
|
||||
|
||||
// Merge MergeSingle the default with the given config and returns the result
|
||||
// MergeSingle merges the default with the given config and returns the result
|
||||
func (c Redis) MergeSingle(cfg Redis) (config Redis) {
|
||||
|
||||
config = cfg
|
||||
|
||||
Reference in New Issue
Block a user