Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for interface (0.21 sec)

  1. internal/jwt/parser.go

    }
    
    // Lookup returns the value and if the key is found.
    func (c *MapClaims) Lookup(key string) (value string, ok bool) {
    	if c == nil {
    		return "", false
    	}
    	var vinterface interface{}
    	vinterface, ok = c.MapClaims[key]
    	if ok {
    		value, ok = vinterface.(string)
    	}
    	return
    }
    
    // SetExpiry sets expiry in unix epoch secs
    func (c *MapClaims) SetExpiry(t time.Time) {
    	c.MapClaims["exp"] = t.Unix()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  2. internal/s3select/sql/parser.go

    package sql
    
    import (
    	"strings"
    
    	"github.com/alecthomas/participle"
    	"github.com/alecthomas/participle/lexer"
    )
    
    // Types with custom Capture interface for parsing
    
    // Boolean is a type for a parsed Boolean literal
    type Boolean bool
    
    // Capture interface used by participle
    func (b *Boolean) Capture(values []string) error {
    	*b = Boolean(strings.EqualFold(values[0], "true"))
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
Back to top