Advertisement
Guest User

JMIM_UseCase_2018_02_27

a guest
Feb 27th, 2018
799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.46 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement