Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Case (0.14 sec)

  1. src/bytes/bytes_test.go

    	toFn := func(name string) (func([]byte, string) []byte, func([]byte, []byte) []byte) {
    		switch name {
    		case "Trim":
    			return Trim, nil
    		case "TrimLeft":
    			return TrimLeft, nil
    		case "TrimRight":
    			return TrimRight, nil
    		case "TrimPrefix":
    			return nil, TrimPrefix
    		case "TrimSuffix":
    			return nil, TrimSuffix
    		default:
    			t.Errorf("Undefined trim function %s", name)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/parse.go

    }
    
    func (p *Parser) pseudo(word string, operands [][]lex.Token) bool {
    	switch word {
    	case "DATA":
    		p.asmData(operands)
    	case "FUNCDATA":
    		p.asmFuncData(operands)
    	case "GLOBL":
    		p.asmGlobl(operands)
    	case "PCDATA":
    		p.asmPCData(operands)
    	case "PCALIGN":
    		p.asmPCAlign(operands)
    	case "TEXT":
    		p.asmText(operands)
    	default:
    		return false
    	}
    	return true
    }
    
    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)
  3. src/bytes/bytes.go

    func Index(s, sep []byte) int {
    	n := len(sep)
    	switch {
    	case n == 0:
    		return 0
    	case n == 1:
    		return IndexByte(s, sep[0])
    	case n == len(s):
    		if Equal(sep, s) {
    			return 0
    		}
    		return -1
    	case n > len(s):
    		return -1
    	case n <= bytealg.MaxLen:
    		// Use brute force when s and sep both are small
    		if len(s) <= bytealg.MaxBruteForce {
    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)
  4. src/bytes/example_test.go

    	// Output:
    	// 8
    	// 9
    	// -1
    }
    
    func ExampleMap() {
    	rot13 := func(r rune) rune {
    		switch {
    		case r >= 'A' && r <= 'Z':
    			return 'A' + (r-'A'+13)%26
    		case r >= 'a' && r <= 'z':
    			return 'a' + (r-'a'+13)%26
    		}
    		return r
    	}
    	fmt.Printf("%s\n", bytes.Map(rot13, []byte("'Twas brillig and the slithy gopher...")))
    	// Output:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. src/builtin/builtin.go

    //	slice = append(slice, anotherSlice...)
    //
    // As a special case, it is legal to append a string to a byte slice, like this:
    //
    //	slice = append([]byte("hello "), "world"...)
    func append(slice []Type, elems ...Type) []Type
    
    // The copy built-in function copies elements from a source slice into a
    // destination slice. (As a special case, it also will copy bytes from a
    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)
  6. src/cmd/cgo/internal/test/callback_windows.go

    	})
    	got := make([]string, 0, n)
    	for i := 0; i < n; i++ {
    		f := runtime.FuncForPC(pc[i] - 1)
    		if f == nil {
    			continue
    		}
    		fname := f.Name()
    		switch fname {
    		case "goCallback":
    			// TODO(qmuntal): investigate why this function doesn't appear
    			// when using the external linker.
    			continue
    		}
    		// In module mode, this package has a fully-qualified import path.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Nov 29 16:01:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  7. src/archive/tar/common.go

    	switch m := fs.FileMode(fi.h.Mode) &^ 07777; m {
    	case c_ISDIR:
    		mode |= fs.ModeDir
    	case c_ISFIFO:
    		mode |= fs.ModeNamedPipe
    	case c_ISLNK:
    		mode |= fs.ModeSymlink
    	case c_ISBLK:
    		mode |= fs.ModeDevice
    	case c_ISCHR:
    		mode |= fs.ModeDevice
    		mode |= fs.ModeCharDevice
    	case c_ISSOCK:
    		mode |= fs.ModeSocket
    	}
    
    	switch fi.h.Typeflag {
    	case TypeSymlink:
    		mode |= fs.ModeSymlink
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  8. src/cmd/asm/internal/asm/asm.go

    	switch valueAddr.Type {
    	case obj.TYPE_CONST:
    		switch sz {
    		case 1, 2, 4, 8:
    			nameAddr.Sym.WriteInt(p.ctxt, nameAddr.Offset, int(sz), valueAddr.Offset)
    		default:
    			p.errorf("bad int size for DATA argument: %d", sz)
    		}
    	case obj.TYPE_FCONST:
    		switch sz {
    		case 4:
    			nameAddr.Sym.WriteFloat32(p.ctxt, nameAddr.Offset, float32(valueAddr.Val.(float64)))
    		case 8:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 25.3K bytes
    - Viewed (0)
  9. src/archive/tar/stat_unix.go

    		dev := uint64(sys.Rdev) // May be int32 or uint32
    		switch runtime.GOOS {
    		case "aix":
    			var major, minor uint32
    			major = uint32((dev & 0x3fffffff00000000) >> 32)
    			minor = uint32((dev & 0x00000000ffffffff) >> 0)
    			h.Devmajor, h.Devminor = int64(major), int64(minor)
    		case "linux":
    			// Copied from golang.org/x/sys/unix/dev_linux.go.
    			major := uint32((dev & 0x00000000000fff00) >> 8)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. src/cmd/cgo/doc.go

    	go tool fix -r cftype <pkg>
    	go tool fix -r jni <pkg>
    
    It will replace nil with 0 in the appropriate places.
    
    The EGLDisplay case was introduced in Go 1.12. Use the egl rewrite
    to auto-update code from Go 1.11 and earlier:
    
    	go tool fix -r egl <pkg>
    
    The EGLConfig case was introduced in Go 1.15. Use the eglconf rewrite
    to auto-update code from Go 1.14 and earlier:
    
    	go tool fix -r eglconf <pkg>
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
Back to top