Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func GetRandomLink(host string) string{
- log.Print("My function is used!")
- return "http://example.com/path1"
- }
- type TlinksMap struct{
- GetRandomLink func(host string) string
- }
- type generic struct{
- TlinksMap
- }
- func TestBasic(t *testing.T) {
- linksMap = &generic{TlinksMap: &TlinksMap{GetRandomLink: GetRandomLink}}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement