Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for decUint8 (0.18 sec)

  1. src/encoding/gob/decode.go

    	value.SetBool(state.decodeUint() != 0)
    }
    
    // decInt8 decodes an integer and stores it as an int8 in value.
    func decInt8(i *decInstr, state *decoderState, value reflect.Value) {
    	v := state.decodeInt()
    	if v < math.MinInt8 || math.MaxInt8 < v {
    		error_(i.ovfl)
    	}
    	value.SetInt(v)
    }
    
    // decUint8 decodes an unsigned integer and stores it as a uint8 in value.
    func decUint8(i *decInstr, state *decoderState, value reflect.Value) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  2. src/encoding/gob/codec_test.go

    		}
    	}
    
    	// int8
    	{
    		var data int8
    		instr := &decInstr{decInt8, 6, nil, ovfl}
    		state := newDecodeStateFromData(signedResult)
    		execDec(instr, state, t, reflect.ValueOf(&data))
    		if data != 17 {
    			t.Errorf("int8 a = %v not 17", data)
    		}
    	}
    
    	// uint8
    	{
    		var data uint8
    		instr := &decInstr{decUint8, 6, nil, ovfl}
    		state := newDecodeStateFromData(unsignedResult)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 19 23:03:14 UTC 2023
    - 36.9K bytes
    - Viewed (0)
  3. src/internal/gover/gover.go

    	}
    	if len(x) > len(y) {
    		return +1
    	}
    	if x < y {
    		return -1
    	} else {
    		return +1
    	}
    }
    
    // DecInt returns the decimal string decremented by 1, or the empty string
    // if the decimal is all zeroes.
    // (Copied from golang.org/x/mod/module's decDecimal.)
    func DecInt(decimal string) string {
    	// Scan right to left turning 0s to 9s until you find a digit to decrement.
    	digits := []byte(decimal)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. src/cmd/go/internal/gover/gover.go

    //
    // Examples:
    //
    //	Prev("1.2") = "1.1"
    //	Prev("1.3rc4") = "1.2"
    func Prev(x string) string {
    	v := gover.Parse(x)
    	if gover.CmpInt(v.Minor, "1") <= 0 {
    		return v.Major
    	}
    	return v.Major + "." + gover.DecInt(v.Minor)
    }
    
    // IsValid reports whether the version x is valid.
    func IsValid(x string) bool {
    	return gover.IsValid(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 2.5K bytes
    - Viewed (0)
Back to top