batazor/go-auth

View on GitHub

Showing 99 of 99 total issues

exported function Update should have comment or be unexported
Open

func Update(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/user/user.go by golint

exported function NewAccessToken should have comment or be unexported
Open

func NewAccessToken(timeDuration int64) (string, error) {
Severity: Minor
Found in models/session/session.go by golint

exported function LogEntrySetField should have comment or be unexported
Open

func LogEntrySetField(r *http.Request, key string, value interface{}) {
Severity: Minor
Found in utils/logger.go by golint

exported function VerifyCaptcha should have comment or be unexported
Open

func VerifyCaptcha(captchaResponse []byte) error {
Severity: Minor
Found in utils/recaptcha/recaptcha.go by golint

Trailing spaces
Open

  
Severity: Info
Found in README.md by markdownlint

MD009 - Trailing spaces

Tags: whitespace

Aliases: no-trailing-spaces

Parameters: br_spaces (number; default: 0)

This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

don't use ALL_CAPS in Go names; use CamelCase
Open

    API_MAIL_ADDRESS := utils.Getenv("API_MAIL_ADDRESS", "localhost:50051")
Severity: Minor
Found in grpc/server/server.go by golint

exported function RecoveryByToken should have comment or be unexported
Open

func RecoveryByToken(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/session/session.go by golint

don't use ALL_CAPS in Go names; use CamelCase
Open

    PRIVATE_KEY = "cert/private_key.pem"
Severity: Minor
Found in models/session/session.go by golint

don't use MixedCaps in package name; userModel should be usermodel
Open

package userModel
Severity: Minor
Found in models/user/types.go by golint

exported type StructuredLoggerEntry should have comment or be unexported
Open

type StructuredLoggerEntry struct {
Severity: Minor
Found in utils/types.go by golint

Trailing spaces
Open

  
Severity: Info
Found in README.md by markdownlint

MD009 - Trailing spaces

Tags: whitespace

Aliases: no-trailing-spaces

Parameters: br_spaces (number; default: 0)

This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

don't use ALL_CAPS in Go names; use CamelCase
Open

    var TOKEN_REFRESH = r.Header.Get("Authorization")
Severity: Minor
Found in handlers/session/session.go by golint

exported function Recovery should have comment or be unexported
Open

func Recovery(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/session/session.go by golint

exported function List should have comment or be unexported
Open

func List(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/user/user.go by golint

exported function Captcha should have comment or be unexported
Open

func Captcha(next http.Handler) http.Handler {
Severity: Minor
Found in middleware/captcha.go by golint

exported function List should have comment or be unexported
Open

func List() (error, []User) {
Severity: Minor
Found in models/user/user.go by golint

exported type UserGoogle should have comment or be unexported
Open

type UserGoogle struct {
Severity: Minor
Found in handlers/oauth/types.go by golint

exported function FindCount should have comment or be unexported
Open

func FindCount(user User) (int64, error) {
Severity: Minor
Found in models/user/user.go by golint

struct field Id should be ID
Open

    Id            string     `json:"id" bson:"_id,omitempty"`
Severity: Minor
Found in models/user/types.go by golint

exported method StructuredLogger.NewLogEntry should have comment or be unexported
Open

func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry {
Severity: Minor
Found in utils/logger.go by golint
Severity
Category
Status
Source
Language