github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/tcpip/stack/neighborstate_string.go (about)

     1  // Copyright 2021 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by "stringer -type NeighborState"; DO NOT EDIT.
    16  
    17  package stack
    18  
    19  import "strconv"
    20  
    21  func _() {
    22  	// An "invalid array index" compiler error signifies that the constant values have changed.
    23  	// Re-run the stringer command to generate them again.
    24  	var x [1]struct{}
    25  	_ = x[Unknown-0]
    26  	_ = x[Incomplete-1]
    27  	_ = x[Reachable-2]
    28  	_ = x[Stale-3]
    29  	_ = x[Delay-4]
    30  	_ = x[Probe-5]
    31  	_ = x[Static-6]
    32  	_ = x[Unreachable-7]
    33  }
    34  
    35  const _NeighborState_name = "UnknownIncompleteReachableStaleDelayProbeStaticUnreachable"
    36  
    37  var _NeighborState_index = [...]uint8{0, 7, 17, 26, 31, 36, 41, 47, 58}
    38  
    39  func (i NeighborState) String() string {
    40  	if i >= NeighborState(len(_NeighborState_index)-1) {
    41  		return "NeighborState(" + strconv.FormatInt(int64(i), 10) + ")"
    42  	}
    43  	return _NeighborState_name[_NeighborState_index[i]:_NeighborState_index[i+1]]
    44  }