mirror of
https://github.com/kataras/iris.git
synced 2026-03-07 08:55:57 +00:00
replace ioutil with io package and other minor improvements
This commit is contained in:
@@ -78,8 +78,13 @@ func (c Config) Validate() Config {
|
||||
}
|
||||
|
||||
if c.SessionIDGenerator == nil {
|
||||
c.SessionIDGenerator = func(*context.Context) string {
|
||||
id, _ := uuid.NewRandom()
|
||||
c.SessionIDGenerator = func(ctx *context.Context) string {
|
||||
id, err := uuid.NewRandom()
|
||||
if err != nil {
|
||||
ctx.StopWithError(400, err)
|
||||
return ""
|
||||
}
|
||||
|
||||
return id.String()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user