SHARE
TWEET

JMIM_UseCase_2018_02_27

a guest Feb 27th, 2018 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type INTERFACE_MakeContextCurrent interface{
  2.     MakeContextCurrent(/**VOID**/)(/**VOID**/)
  3. }
  4.  
  5. //:Assert Function:
  6. func PAW_NOT_NIL(
  7.  
  8.     //:paw: "Probably A Window"
  9.     paw INTERFACE_MakeContextCurrent ,
  10.    
  11.     //:on error message:
  12.     err_msg string,
  13. ){
  14.     switch v := paw.(type){
  15.         case *glfw.Window:
  16.             if(nil==v){ panic("[PAWERR]"+err_msg); }
  17.             return;
  18.         default:
  19.             panic("[PAW_NOT_NIL:UnsuporrtedType]");
  20.     }
  21.    
  22.     panic("[PAWERR:ExpectDeadCodeLine]");
  23.     return;
  24. }
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