From 16f593f7862c1bdedcf42c54dec1e8b2170e49c9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 6 Dec 2017 13:55:51 +0000 Subject: [PATCH] Fix some linting errors --- .../matrix-org/dendrite/clientapi/routing/register_test.go | 6 +++--- src/github.com/matrix-org/dendrite/common/config/config.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/register_test.go b/src/github.com/matrix-org/dendrite/clientapi/routing/register_test.go index de18c8d2..0fae27e9 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/register_test.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/register_test.go @@ -22,15 +22,15 @@ import ( var ( // Registration Flows that the server allows. - allowedFlows []authtypes.Flow = []authtypes.Flow{ + allowedFlows = []authtypes.Flow{ { - []authtypes.LoginType{ + Stages: []authtypes.LoginType{ authtypes.LoginType("stage1"), authtypes.LoginType("stage2"), }, }, { - []authtypes.LoginType{ + Stages: []authtypes.LoginType{ authtypes.LoginType("stage1"), authtypes.LoginType("stage3"), }, diff --git a/src/github.com/matrix-org/dendrite/common/config/config.go b/src/github.com/matrix-org/dendrite/common/config/config.go index d4a9a2c5..f291a076 100644 --- a/src/github.com/matrix-org/dendrite/common/config/config.go +++ b/src/github.com/matrix-org/dendrite/common/config/config.go @@ -355,10 +355,10 @@ func (config *Dendrite) derive() { if config.Matrix.RecaptchaEnabled { config.Derived.Registration.Params[authtypes.LoginTypeRecaptcha] = map[string]string{"public_key": config.Matrix.RecaptchaPublicKey} config.Derived.Registration.Flows = append(config.Derived.Registration.Flows, - authtypes.Flow{[]authtypes.LoginType{authtypes.LoginTypeRecaptcha}}) + authtypes.Flow{Stages: []authtypes.LoginType{authtypes.LoginTypeRecaptcha}}) } else { config.Derived.Registration.Flows = append(config.Derived.Registration.Flows, - authtypes.Flow{[]authtypes.LoginType{authtypes.LoginTypeDummy}}) + authtypes.Flow{Stages: []authtypes.LoginType{authtypes.LoginTypeDummy}}) } }