...

Source file src/github.com/pmorjan/kmod/status_string.go

Documentation: github.com/pmorjan/kmod

     1  // Code generated by "stringer -type status"; DO NOT EDIT.
     2  
     3  package kmod
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[unknown-0]
    12  	_ = x[unloaded-1]
    13  	_ = x[unloading-2]
    14  	_ = x[loading-3]
    15  	_ = x[live-4]
    16  	_ = x[inuse-5]
    17  }
    18  
    19  const _status_name = "unknownunloadedunloadingloadingliveinuse"
    20  
    21  var _status_index = [...]uint8{0, 7, 15, 24, 31, 35, 40}
    22  
    23  func (i status) String() string {
    24  	if i < 0 || i >= status(len(_status_index)-1) {
    25  		return "status(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _status_name[_status_index[i]:_status_index[i+1]]
    28  }
    29  

View as plain text