File: hex.go

package info (click to toggle)
golang-github-d5-tengo 2.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,240 kB
  • sloc: makefile: 12
file content (12 lines) | stat: -rw-r--r-- 251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
package stdlib

import (
	"encoding/hex"

	"github.com/d5/tengo/v2"
)

var hexModule = map[string]tengo.Object{
	"encode": &tengo.UserFunction{Value: FuncAYRS(hex.EncodeToString)},
	"decode": &tengo.UserFunction{Value: FuncASRYE(hex.DecodeString)},
}