Discover Packages 
           
        
          
            github.com/asciich/asciichgolangpublic 
           
        
          
            pkg 
           
        
        
          
            mustutils
           
          
            
               
          
        
       
     
   
  
    
  
    
       
    
    
      package 
    
    
      
        
           
      
    
   
    
      
  
    
      
  
    
      Version:  
        v0.346.0
     
    
      Opens a new window with list of versions in this module.
    
    
    
   
      
  
    Published: Jun 18, 2025
   
      
  
    License: Apache-2.0 
      
    
   
  
    Opens a new window with license information.
  
      
        
  
    
      Imports:  1
     
   
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by:  0
     
   
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
 
    
      
    
    
  
    
  
    
      Jump to ...
     
  
  
    
    
      
        
          Documentation
         
        
  
      
        Index
       
     
    
      
        Constants
       
     
    
      
        Variables
       
     
    
      
        Functions
       
      
        
          
            
              
                Must(v, err)
               
             
          
            
              
                Must0(err)
               
             
          
            
              
                Must2(v1, v2, err)
               
             
          
            
              
                Must3(v1, v2, v3, err)
               
             
          
            
              
                Must4(v1, v2, v3, v4, err)
               
             
          
         
      
     
    
      
        Types
       
      
     
  
  
 
       
    
    
      
        
          Source Files
         
       
    
    
   
   
  
    
      
        
          Documentation 
        
       
     
  
 
    
  
    
      
      
        
          
  
    
      ¶ 
     
    
  
    
  
    
      
        
 
    
        func Must[T any](v T, err error) T  
        func Must0(err error)  
        func Must2[T1 any, T2 any](v1 T1, v2 T2, err error) (T1, T2)  
        func Must3[T1 any, T2 any, T3 any](v1 T1, v2 T2, v3 T3, err error) (T1, T2, T3)  
        func Must4[T1 any, T2 any, T3 any, T4 any](v1 T1, v2 T2, v3 T3, v4 T4, err error) (T1, T2, T3, T4)  
 
 
  
  
  
  
  
	  
  
  
    
    
    
  Used to apply the Must pattern to any function returning a value and an error:
Usage: x := Must(functionReturningOneValueAndAnError())
If there is no error the return value is returned and stored into 'x'.
If there is an error it will be logged using `logging.LogGoErrorFatal(err)` which aborts the execution.
 
  
         
	  
  
  
    
    
    
  Same as `Must` but for functions only returning an error.
  
         
	  
  
  
    
    
    
      func Must2[T1 any , T2 any ](v1 T1, v2 T2, err error ) (T1, T2) 
     
  Same as `Must` but supporting 2 return values.
  
         
	  
  
  
    
    
    
      func Must3[T1 any , T2 any , T3 any ](v1 T1, v2 T2, v3 T3, err error ) (T1, T2, T3) 
     
  Same as `Must` but supporting 3 return values.
  
         
	  
  
  
    
    
    
      func Must4[T1 any , T2 any , T3 any , T4 any ](v1 T1, v2 T2, v3 T3, v4 T4, err error ) (T1, T2, T3, T4) 
     
  Same as `Must` but supporting 4 return values.
  
           
      
     
   
        
      
      
        
  
    
      ¶ 
     
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.