SHARE
TWEET

Untitled

a guest Apr 7th, 2016 3 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func GetRandomLink(host string) string{
  2.     log.Print("My function is used!")
  3.     return "http://example.com/path1"
  4. }
  5.  
  6. type TlinksMap struct{
  7.     GetRandomLink func(host string) string
  8. }
  9.  
  10.  
  11. type generic struct{
  12.     TlinksMap
  13. }
  14.  
  15. func TestBasic(t *testing.T) {
  16.     linksMap = &generic{TlinksMap: &TlinksMap{GetRandomLink: GetRandomLink}}
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top