// Copyright 2017 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packageerrorsimport"fmt"typeLoginSourceNotActivatedstruct{SourceIDint64}funcIsLoginSourceNotActivated(errerror)bool{_,ok:=err.(LoginSourceNotActivated)returnok}func(errLoginSourceNotActivated)Error()string{returnfmt.Sprintf("login source is not activated [source_id: %d]",err.SourceID)}typeInvalidLoginSourceTypestruct{Typeinterface{}}funcIsInvalidLoginSourceType(errerror)bool{_,ok:=err.(InvalidLoginSourceType)returnok}func(errInvalidLoginSourceType)Error()string{returnfmt.Sprintf("invalid login source type [type: %v]",err.Type)}