Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for val2 (0.14 sec)

  1. cmd/http-stats.go

    	stats.Lock()
    	defer stats.Unlock()
    	if val, ok := stats.apiStats[api]; ok && val > 0 {
    		stats.apiStats[api]--
    	}
    }
    
    // Get returns the current counter on input API string
    func (stats *HTTPAPIStats) Get(api string) int {
    	if stats == nil {
    		return 0
    	}
    
    	stats.RLock()
    	defer stats.RUnlock()
    
    	val, ok := stats.apiStats[api]
    	if ok {
    		return val
    	}
    
    	return 0
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
Back to top