Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for if (0.49 sec)

  1. src/bytes/bytes.go

    // there is no code point in common.
    func LastIndexAny(s []byte, chars string) int {
    	if chars == "" {
    		// Avoid scanning all of s.
    		return -1
    	}
    	if len(s) > 8 {
    		if as, isASCII := makeASCIISet(chars); isASCII {
    			for i := len(s) - 1; i >= 0; i-- {
    				if as.contains(s[i]) {
    					return i
    				}
    			}
    			return -1
    		}
    	}
    	if len(s) == 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. src/archive/zip/zip_test.go

    	for i := 0; i < chunks; i++ {
    		_, err := io.ReadFull(rc, chunk)
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	if frag := int(size % chunkSize); frag > 0 {
    		_, err := io.ReadFull(rc, chunk[:frag])
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	gotEnd, err := io.ReadAll(rc)
    	if err != nil {
    		t.Fatal("read end:", err)
    	}
    	if !bytes.Equal(gotEnd, end) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/parse.go

    		tok := p.next()
    		if tok.ScanToken == scanner.EOF {
    			p.errorf("missing right parenthesis")
    			return
    		}
    		rname := tok.String()
    		p.back()
    		haveConstant = !p.atStartOfRegister(rname)
    		if !haveConstant {
    			p.back() // Put back the '('.
    		}
    	}
    	if haveConstant {
    		p.back()
    		if p.have(scanner.Float) {
    			if prefix != '$' {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/input.go

    	name := in.macroName()
    	in.expectNewline("#if[n]def")
    	if !in.enabled() {
    		truth = false
    	} else if _, defined := in.macros[name]; !defined {
    		truth = !truth
    	}
    	in.ifdefStack = append(in.ifdefStack, truth)
    }
    
    // #else processing
    func (in *Input) else_() {
    	in.expectNewline("#else")
    	if len(in.ifdefStack) == 0 {
    		in.Error("unmatched #else")
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  5. src/archive/tar/writer.go

    	// Use long-link files if Name or Linkname exceeds the field size.
    	const longName = "././@LongLink"
    	if len(hdr.Name) > nameSize {
    		data := hdr.Name + "\x00"
    		if err := tw.writeRawFile(longName, data, TypeGNULongName, FormatGNU); err != nil {
    			return err
    		}
    	}
    	if len(hdr.Linkname) > nameSize {
    		data := hdr.Linkname + "\x00"
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  6. src/builtin/builtin.go

    // (m[key]) from the map. If m is nil or there is no such element, delete
    // is a no-op.
    func delete(m map[Type]Type1, key Type)
    
    // The len built-in function returns the length of v, according to its type:
    //
    //	Array: the number of elements in v.
    //	Pointer to array: the number of elements in *v (even if v is nil).
    //	Slice, or map: the number of elements in v; if v is nil, len(v) is zero.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. src/archive/zip/reader.go

    	if r.nread > r.f.UncompressedSize64 {
    		return 0, ErrFormat
    	}
    	if err == nil {
    		return
    	}
    	if err == io.EOF {
    		if r.nread != r.f.UncompressedSize64 {
    			return 0, io.ErrUnexpectedEOF
    		}
    		if r.desr != nil {
    			if err1 := readDataDescriptor(r.desr, r.f); err1 != nil {
    				if err1 == io.EOF {
    					err = io.ErrUnexpectedEOF
    				} else {
    					err = err1
    				}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  8. src/bufio/scan.go

    // immediately stops the scanning.
    //
    // Otherwise, the [Scanner] advances the input. If the token is not nil,
    // the [Scanner] returns it to the user. If the token is nil, the
    // Scanner reads more data and continues scanning; if there is no more
    // data--if atEOF was true--the [Scanner] returns. If the data does not
    // yet hold a complete token, for instance if it has no newline while
    // scanning lines, a [SplitFunc] can return (0, nil, nil) to signal the
    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)
  9. src/archive/zip/struct.go

    		m = s_IFIFO
    	case fs.ModeSocket:
    		m = s_IFSOCK
    	case fs.ModeDevice:
    		m = s_IFBLK
    	case fs.ModeDevice | fs.ModeCharDevice:
    		m = s_IFCHR
    	}
    	if mode&fs.ModeSetuid != 0 {
    		m |= s_ISUID
    	}
    	if mode&fs.ModeSetgid != 0 {
    		m |= s_ISGID
    	}
    	if mode&fs.ModeSticky != 0 {
    		m |= s_ISVTX
    	}
    	return m | uint32(mode&0777)
    }
    
    func unixModeToFileMode(m uint32) fs.FileMode {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/arch/arch.go

    	register["SB"] = RSB
    	register["FP"] = RFP
    	register["PC"] = RPC
    	if linkArch == &x86.Linkamd64 {
    		// Alias g to R14
    		register["g"] = x86.REGG
    	}
    	// Register prefix not used on this architecture.
    
    	instructions := make(map[string]obj.As)
    	for i, s := range obj.Anames {
    		instructions[s] = obj.As(i)
    	}
    	for i, s := range x86.Anames {
    		if obj.As(i) >= obj.A_ARCHSPECIFIC {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Mar 21 06:51:28 GMT 2023
    - 21.3K bytes
    - Viewed (0)
Back to top