Preparing report...

Report for github.com/mbict/go-cqrs

A+    Excellent!    Found 27 issues across 45 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint40%

Golint is a linter for Go source code.

    • go-cqrs/aggregate_command_handler.go
    • Line 9: warning: exported type ErrorAggregateNotFound should have comment or be unexported (golint)
    • Line 15: warning: exported type ErrorNotAnAggregateCommand should have comment or be unexported (golint)
    • Line 21: warning: exported type ErrorAggregateCannotHandleCommand should have comment or be unexported (golint)
    • Line 40: warning: exported type AggregateCommandHandlerFunc should have comment or be unexported (golint)
    • Line 42: warning: exported function AggregateCommandHandlerCallback should have comment or be unexported (golint)
    • go-cqrs/aggregate_context.go
    • Line 3: warning: exported type AggregateContext should have comment or be unexported (golint)
    • Line 35: warning: exported function NewAggregateContext should have comment or be unexported (golint)
    • go-cqrs/database/mysql/uuid.go
    • Line 8: warning: comment on exported type UUID should be of the form "UUID ..." (with optional leading article) (golint)
    • Line 13: warning: exported function MysqlUUID should have comment or be unexported (golint)
    • Line 19: warning: comment on exported method UUID.Value should be of the form "Value ..." (golint)
    • go-cqrs/eventfactory.go
    • Line 8: warning: exported type ErrorEventFactoryAlreadyRegistered should have comment or be unexported (golint)
    • Line 14: warning: exported type ErrorEventFactoryNotReturningPointer should have comment or be unexported (golint)
    • go-cqrs/database/eventstream.go
    • Line 12: warning: exported var ErrNoEventData should have comment or be unexported (golint)
    • Line 15: warning: exported type EventStream should have comment or be unexported (golint)
    • Line 26: warning: exported function NewDatabaseEventStream should have comment or be unexported (golint)
    • Line 32: warning: exported method EventStream.AggregateId should have comment or be unexported (golint)
    • Line 36: warning: exported method EventStream.EventType should have comment or be unexported (golint)
    • Line 40: warning: exported method EventStream.Version should have comment or be unexported (golint)
    • Line 44: warning: exported method EventStream.Timestamp should have comment or be unexported (golint)
    • Line 48: warning: exported method EventStream.Next should have comment or be unexported (golint)
    • Line 71: warning: exported method EventStream.Scan should have comment or be unexported (golint)
    • go-cqrs/aggregatefactory.go
    • Line 7: warning: exported type ErrorAggregateFactoryAlreadyRegistered should have comment or be unexported (golint)
    • Line 13: warning: exported type AggregateFactoryFunc should have comment or be unexported (golint)
    • go-cqrs/event.go
    • Line 9: warning: exported type EventType should have comment or be unexported (golint)
    • Line 11: warning: comment on exported type Event should be of the form "Event ..." (with optional leading article) (golint)
    • go-cqrs/memory/eventstream.go
    • Line 10: warning: exported var ErrNoEventData should have comment or be unexported (golint)
    • Line 12: warning: exported type EventStream should have comment or be unexported (golint)
    • Line 31: warning: exported method EventStream.EventType should have comment or be unexported (golint)
    • Line 38: warning: exported method EventStream.AggregateId should have comment or be unexported (golint)
    • Line 45: warning: exported method EventStream.Version should have comment or be unexported (golint)
    • Line 54: warning: exported method EventStream.Timestamp should have comment or be unexported (golint)
    • Line 61: warning: exported method EventStream.Next should have comment or be unexported (golint)
    • Line 70: warning: exported method EventStream.Scan should have comment or be unexported (golint)
    • go-cqrs/cqrs.go
    • Line 7: warning: exported var ErrUnknownCommand should have comment or be unexported (golint)
    • Line 8: warning: exported var ErrUnknownEvent should have comment or be unexported (golint)
    • go-cqrs/database/mysql/eventstore.go
    • Line 14: warning: exported var ErrNoAffectedRows should have comment or be unexported (golint)
    • Line 16: warning: exported type EventStore should have comment or be unexported (golint)
    • Line 22: warning: exported function NewDatabaseEventStore should have comment or be unexported (golint)
    • Line 40: warning: exported method EventStore.FindStream should have comment or be unexported (golint)
    • Line 84: warning: exported method EventStore.LoadStream should have comment or be unexported (golint)
    • Line 97: warning: exported method EventStore.WriteEvent should have comment or be unexported (golint)
    • go-cqrs/database/postgres/eventstore.go
    • Line 14: warning: exported var ErrNoAffectedRows should have comment or be unexported (golint)
    • Line 16: warning: exported type EventStore should have comment or be unexported (golint)
    • Line 22: warning: exported function NewDatabaseEventStore should have comment or be unexported (golint)
    • Line 49: warning: exported method EventStore.FindStream should have comment or be unexported (golint)
    • Line 94: warning: exported method EventStore.LoadStream should have comment or be unexported (golint)
    • Line 108: warning: exported method EventStore.WriteEvent should have comment or be unexported (golint)
    • go-cqrs/command.go
    • Line 3: warning: exported type Command should have comment or be unexported (golint)
    • Line 8: warning: exported type AggregateCommand should have comment or be unexported (golint)
    • go-cqrs/domainaggregaterepository.go
    • Line 9: warning: exported var ErrRepositoryNotFound should have comment or be unexported (golint)
    • Line 18: warning: exported type DomainAggregateRepository should have comment or be unexported (golint)
    • Line 24: warning: comment on exported function NewCommonDomainRepository should be of the form "NewCommonDomainRepository ..." (golint)
    • Line 33: warning: exported method DomainAggregateRepository.RepositoryFor should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method DomainAggregateRepository.Load should be of the form "Load ..." (golint)
    • go-cqrs/eventhandler.go
    • Line 5: warning: exported type EventHandler should have comment or be unexported (golint)
    • Line 9: warning: exported type EventHandlerFunc should have comment or be unexported (golint)
    • Line 11: warning: exported method EventHandlerFunc.Handle should have comment or be unexported (golint)
    • Line 15: warning: exported function EventbusWrapper should have comment or be unexported (golint)
    • go-cqrs/aggregateid.go
    • Line 8: warning: exported type AggregateId should have comment or be unexported (golint)
    • Line 24: warning: exported function NewAggregateId should have comment or be unexported (golint)
    • Line 40: warning: exported function NewStringAggregateId should have comment or be unexported (golint)
    • Line 56: warning: exported function NewIntAggregateId should have comment or be unexported (golint)
    • go-cqrs/eventstore.go
    • Line 7: warning: exported type EventStore should have comment or be unexported (golint)
    • Line 12: warning: exported type EventStream should have comment or be unexported (golint)
    • go-cqrs/database/snapshotstore.go
    • Line 63: warning: exported function NewPostgresSnapshotStore should have comment or be unexported (golint)
    • Line 88: warning: exported function NewMySQLSnapshotStore should have comment or be unexported (golint)
    • go-cqrs/memory/eventstore.go
    • Line 8: warning: exported type EventStore should have comment or be unexported (golint)
    • Line 13: warning: exported function NewMemoryEventStore should have comment or be unexported (golint)
    • Line 19: warning: exported method EventStore.LoadStream should have comment or be unexported (golint)
    • Line 36: warning: exported method EventStore.WriteEvent should have comment or be unexported (golint)
    • go-cqrs/eventpublisher.go
    • Line 3: warning: exported type EventPublisher should have comment or be unexported (golint)
    • Line 7: warning: exported type EventPublisherFunc should have comment or be unexported (golint)
    • Line 9: warning: exported method EventPublisherFunc.Publish should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!