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) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| bytes | []byte | Little-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})) }