Skip to content

Commit

Permalink
feat: fixed unnecessary usage of generics
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Simpson committed Dec 11, 2024
1 parent 29bd869 commit 47b6bc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pkg/bus/character/characterbus/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/ShatteredRealms/go-common-service/pkg/bus"
)

type Service[T bus.BusMessage[any]] interface {
bus.BusProcessor[T]
type Service interface {
bus.BusProcessor[Message]
GetCharacters(ctx context.Context) (*Characters, error)
GetCharacterById(ctx context.Context, characterId string) (*Character, error)
DoesOwnCharacter(ctx context.Context, characterId, ownerId string) (bool, error)
Expand All @@ -20,7 +20,7 @@ type service struct {
func NewService(
repo Repository,
characterBus bus.MessageBusReader[Message],
) Service[Message] {
) Service {
return &service{
DefaultBusProcessor: bus.DefaultBusProcessor[Message]{
Reader: characterBus,
Expand Down
6 changes: 3 additions & 3 deletions pkg/bus/gameserver/dimensionbus/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/ShatteredRealms/go-common-service/pkg/bus"
)

type Service[T bus.BusMessage[any]] interface {
bus.BusProcessor[T]
type Service interface {
bus.BusProcessor[Message]
GetDimensions(ctx context.Context) (*Dimensions, error)
GetDimensionById(ctx context.Context, dimensionId string) (*Dimension, error)
}
Expand All @@ -19,7 +19,7 @@ type service struct {
func NewService(
repo Repository,
dimensionBus bus.MessageBusReader[Message],
) Service[Message] {
) Service {
return &service{
DefaultBusProcessor: bus.DefaultBusProcessor[Message]{
Reader: dimensionBus,
Expand Down
6 changes: 3 additions & 3 deletions pkg/bus/gameserver/mapbus/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/ShatteredRealms/go-common-service/pkg/bus"
)

type Service[T bus.BusMessage[any]] interface {
bus.BusProcessor[T]
type Service interface {
bus.BusProcessor[Message]
GetMaps(ctx context.Context) (*Maps, error)
GetMapById(ctx context.Context, mapId string) (*Map, error)
}
Expand All @@ -19,7 +19,7 @@ type service struct {
func NewService(
repo Repository,
mapBus bus.MessageBusReader[Message],
) Service[Message] {
) Service {
return &service{
DefaultBusProcessor: bus.DefaultBusProcessor[Message]{
Reader: mapBus,
Expand Down

0 comments on commit 47b6bc2

Please sign in to comment.