Standard library / go/constant

go/constant.MakeFromBytes()

Decode unsigned little-endian magnitude bytes; empty input represents zero. Expected stdout: '258\n'.

Formal Syntax & Structure

go syntaxgo
func MakeFromBytes(bytes []byte) Value

Parameters & Attributes

NameTypeDescription
bytes[]byteLittle-endian magnitude bytes.

Return Value

Value

Decode unsigned little-endian magnitude bytes; empty input represents zero.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/constant")
func main() { fmt.Println(constant.MakeFromBytes([]byte{2, 1})) }
Go Reference