github.com/btccom/go-micro/v2@v2.9.3/api/router/util/pattern.go (about)

     1  package util
     2  
     3  // download from https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/utilities/pattern.go
     4  
     5  // An OpCode is a opcode of compiled path patterns.
     6  type OpCode int
     7  
     8  // These constants are the valid values of OpCode.
     9  const (
    10  	// OpNop does nothing
    11  	OpNop = OpCode(iota)
    12  	// OpPush pushes a component to stack
    13  	OpPush
    14  	// OpLitPush pushes a component to stack if it matches to the literal
    15  	OpLitPush
    16  	// OpPushM concatenates the remaining components and pushes it to stack
    17  	OpPushM
    18  	// OpConcatN pops N items from stack, concatenates them and pushes it back to stack
    19  	OpConcatN
    20  	// OpCapture pops an item and binds it to the variable
    21  	OpCapture
    22  	// OpEnd is the least positive invalid opcode.
    23  	OpEnd
    24  )