Skip to content

Commit

Permalink
Move tag methods to _nocoverage files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Jul 15, 2024
1 parent 9f3fb0b commit b2e203a
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 22 deletions.
3 changes: 0 additions & 3 deletions aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,3 @@ type AggregateRoute interface {
Route
isAggregateRoute()
}

func (HandlesCommandRoute) isAggregateRoute() {}
func (RecordsEventRoute) isAggregateRoute() {}
4 changes: 4 additions & 0 deletions aggregate_nocoverage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package dogma

func (HandlesCommandRoute) isAggregateRoute() {}
func (RecordsEventRoute) isAggregateRoute() {}
3 changes: 0 additions & 3 deletions integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,3 @@ type IntegrationRoute interface {
Route
isIntegrationRoute()
}

func (HandlesCommandRoute) isIntegrationRoute() {}
func (RecordsEventRoute) isIntegrationRoute() {}
4 changes: 4 additions & 0 deletions integration_nocoverage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package dogma

func (HandlesCommandRoute) isIntegrationRoute() {}
func (RecordsEventRoute) isIntegrationRoute() {}
4 changes: 0 additions & 4 deletions process.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,3 @@ type ProcessRoute interface {
Route
isProcessRoute()
}

func (HandlesEventRoute) isProcessRoute() {}
func (ExecutesCommandRoute) isProcessRoute() {}
func (SchedulesTimeoutRoute) isProcessRoute() {}
5 changes: 5 additions & 0 deletions process_nocoverage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dogma

func (HandlesEventRoute) isProcessRoute() {}
func (ExecutesCommandRoute) isProcessRoute() {}
func (SchedulesTimeoutRoute) isProcessRoute() {}
2 changes: 0 additions & 2 deletions projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,3 @@ type ProjectionRoute interface {
Route
isProjectionRoute()
}

func (HandlesEventRoute) isProjectionRoute() {}
3 changes: 3 additions & 0 deletions projection_nocoverage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package dogma

func (HandlesEventRoute) isProjectionRoute() {}
14 changes: 4 additions & 10 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ type (
SchedulesTimeoutRoute struct{ Type reflect.Type }
)

func (HandlesCommandRoute) isRoute() {}
func (ExecutesCommandRoute) isRoute() {}
func (HandlesEventRoute) isRoute() {}
func (RecordsEventRoute) isRoute() {}
func (SchedulesTimeoutRoute) isRoute() {}

func typeOf[T any]() reflect.Type {
return reflect.TypeOf((*T)(nil)).Elem()
}

type (
// HandlesCommandOption is an option that affects the behavior of the route
// returned by [HandlesCommand].
Expand All @@ -107,3 +97,7 @@ type (
// route returned by [SchedulesTimeout].
SchedulesTimeoutOption struct{}
)

func typeOf[T any]() reflect.Type {
return reflect.TypeOf((*T)(nil)).Elem()
}
7 changes: 7 additions & 0 deletions route_nocoverage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dogma

func (HandlesCommandRoute) isRoute() {}
func (ExecutesCommandRoute) isRoute() {}
func (HandlesEventRoute) isRoute() {}
func (RecordsEventRoute) isRoute() {}
func (SchedulesTimeoutRoute) isRoute() {}

0 comments on commit b2e203a

Please sign in to comment.