diff --git a/internal/testutil/tag_offline.go b/internal/testutil/tag_offline.go index fc57c90..2335a5e 100644 --- a/internal/testutil/tag_offline.go +++ b/internal/testutil/tag_offline.go @@ -1,3 +1,4 @@ +//go:build !online // +build !online package testutil @@ -6,8 +7,6 @@ import ( "git.grassecon.net/urdt/ussd/internal/handlers/server" ) -var AccountService server.AccountServiceInterface - -func init() { - AccountService = &server.MockAccountService{} -} \ No newline at end of file +var ( + AccountService server.AccountServiceInterface = &server.TestAccountService{} +) diff --git a/internal/testutil/tag_online.go b/internal/testutil/tag_online.go index cc3f00c..5a7e928 100644 --- a/internal/testutil/tag_online.go +++ b/internal/testutil/tag_online.go @@ -1,11 +1,10 @@ +//go:build online // +build online package testutil import "git.grassecon.net/urdt/ussd/internal/handlers/server" -var AccountService server.AccountServiceInterface - -func init() { - AccountService = &server.AccountService{} -} +var ( + AccountService server.AccountServiceInterface +)