forked from urdt/ussd
pass account service as a global var
This commit is contained in:
parent
554cecc7f3
commit
70e234aa7c
@ -1,3 +1,4 @@
|
|||||||
|
//go:build !online
|
||||||
// +build !online
|
// +build !online
|
||||||
|
|
||||||
package testutil
|
package testutil
|
||||||
@ -6,8 +7,6 @@ import (
|
|||||||
"git.grassecon.net/urdt/ussd/internal/handlers/server"
|
"git.grassecon.net/urdt/ussd/internal/handlers/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
var AccountService server.AccountServiceInterface
|
var (
|
||||||
|
AccountService server.AccountServiceInterface = &server.TestAccountService{}
|
||||||
func init() {
|
)
|
||||||
AccountService = &server.MockAccountService{}
|
|
||||||
}
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
|
//go:build online
|
||||||
// +build online
|
// +build online
|
||||||
|
|
||||||
package testutil
|
package testutil
|
||||||
|
|
||||||
import "git.grassecon.net/urdt/ussd/internal/handlers/server"
|
import "git.grassecon.net/urdt/ussd/internal/handlers/server"
|
||||||
|
|
||||||
var AccountService server.AccountServiceInterface
|
var (
|
||||||
|
AccountService server.AccountServiceInterface
|
||||||
func init() {
|
)
|
||||||
AccountService = &server.AccountService{}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user