Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for indexType (0.19 sec)

  1. src/bytes/bytes.go

    func ContainsFunc(b []byte, f func(rune) bool) bool {
    	return IndexFunc(b, f) >= 0
    }
    
    // IndexByte returns the index of the first instance of c in b, or -1 if c is not present in b.
    func IndexByte(b []byte, c byte) int {
    	return bytealg.IndexByte(b, c)
    }
    
    func indexBytePortable(s []byte, c byte) int {
    	for i, b := range s {
    		if b == c {
    			return i
    		}
    	}
    	return -1
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  2. internal/jwt/parser.go

    func ParseUnverifiedStandardClaims(token []byte, claims *StandardClaims, buf []byte) (*SigningMethodHMAC, error) {
    	if bytes.Count(token, []byte(".")) != 2 {
    		return nil, jwtgo.ErrSignatureInvalid
    	}
    
    	i := bytes.IndexByte(token, '.')
    	j := bytes.LastIndexByte(token, '.')
    
    	n, err := base64DecodeBytes(token[:i], buf)
    	if err != nil {
    		return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed}
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    	fmt.Println(bytes.Index([]byte("chicken"), []byte("dmr")))
    	// Output:
    	// 4
    	// -1
    }
    
    func ExampleIndexByte() {
    	fmt.Println(bytes.IndexByte([]byte("chicken"), byte('k')))
    	fmt.Println(bytes.IndexByte([]byte("chicken"), byte('g')))
    	// Output:
    	// 4
    	// -1
    }
    
    func ExampleIndexFunc() {
    	f := func(c rune) bool {
    		return unicode.Is(unicode.Han, c)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. cmd/metacache-walk.go

    		forward := ""
    		if len(opts.ForwardTo) > 0 && strings.HasPrefix(opts.ForwardTo, current) {
    			forward = strings.TrimPrefix(opts.ForwardTo, current)
    			// Trim further directories and trailing slash.
    			if idx := strings.IndexByte(forward, '/'); idx > 0 {
    				forward = forward[:idx]
    			}
    		}
    		if contextCanceled(ctx) {
    			return ctx.Err()
    		}
    		if opts.Limit > 0 && objsReturned >= opts.Limit {
    			return nil
    		}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  5. istioctl/pkg/validate/validate.go

    	case []any:
    		return transformInterfaceArray(v)
    	case map[any]any:
    		return transformInterfaceMap(v)
    	default:
    		return v
    	}
    }
    
    func servicePortPrefixed(n string) bool {
    	i := strings.IndexByte(n, '-')
    	if i >= 0 {
    		n = n[:i]
    	}
    	p := protocol.Parse(n)
    	return p == protocol.Unsupported
    }
    
    func handleNamespace(istioNamespace string) string {
    	if istioNamespace == "" {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Jan 22 17:58:52 GMT 2024
    - 15K bytes
    - Viewed (0)
  6. istioctl/pkg/kubeinject/kubeinject.go

    			// if the revision is "default", render templates with an empty revision
    			if rev == util.DefaultRevisionName {
    				rev = ""
    			}
    			injectorAddress := centralOpts.Xds
    			index := strings.IndexByte(injectorAddress, ':')
    			if index != -1 {
    				injectorAddress = injectorAddress[:index]
    			}
    			injector, meshConfig, err := setupKubeInjectParameters(cliContext, &sidecarTemplate, &valuesConfig, rev, injectorAddress)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  7. src/bufio/scan.go

    // newline.
    func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error) {
    	if atEOF && len(data) == 0 {
    		return 0, nil, nil
    	}
    	if i := bytes.IndexByte(data, '\n'); i >= 0 {
    		// We have a full newline-terminated line.
    		return i + 1, dropCR(data[0:i]), nil
    	}
    	// If we're at EOF, we have a final, non-terminated line. Return it.
    	if atEOF {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  8. cmd/streaming-signature-v4.go

    	input := bufio.NewScanner(bytes.NewReader(valueBuffer.Bytes()))
    	for input.Scan() {
    		line := strings.TrimSpace(input.Text())
    		if line == "" {
    			continue
    		}
    		// Find first separator.
    		idx := strings.IndexByte(line, trailerKVSeparator[0])
    		if idx <= 0 || idx >= len(line) {
    			if cr.debug {
    				fmt.Printf("index, ':' not found in %q\n", line)
    			}
    			return errMalformedEncoding
    		}
    		key := line[:idx]
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  9. src/bufio/bufio.go

    // ReadSlice returns err != nil if and only if line does not end in delim.
    func (b *Reader) ReadSlice(delim byte) (line []byte, err error) {
    	s := 0 // search start index
    	for {
    		// Search buffer.
    		if i := bytes.IndexByte(b.buf[b.r+s:b.w], delim); i >= 0 {
    			i += s
    			line = b.buf[b.r : b.r+i+1]
    			b.r += i + 1
    			break
    		}
    
    		// Pending error?
    		if b.err != nil {
    			line = b.buf[b.r:b.w]
    			b.r = b.w
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  10. src/bytes/buffer.go

    	line = append(line, slice...)
    	return line, err
    }
    
    // readSlice is like ReadBytes but returns a reference to internal buffer data.
    func (b *Buffer) readSlice(delim byte) (line []byte, err error) {
    	i := IndexByte(b.buf[b.off:], delim)
    	end := b.off + i + 1
    	if i < 0 {
    		end = len(b.buf)
    		err = io.EOF
    	}
    	line = b.buf[b.off:end]
    	b.off = end
    	b.lastRead = opRead
    	return line, err
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
Back to top