base60

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

README

base60天干地支编码

Install

  1. go get github.com/chai2010/base60
  2. go run hello.go

Example

package main

import (
	"fmt"

	"github.com/chai2010/base60"
)

func main() {
	s0 := base60.Encode([]byte("你好"))
	fmt.Println(s0)

	s1 := base60.Decode("乙丑癸巳甲寅己亥丁卯甲申丁未甲午己巳")
	fmt.Println(string(s1))

	// Output:
	// 乙丑癸巳甲寅己亥丁卯甲申丁未甲午己巳
	// 你好
}

BUGS

Report bugs to chaishushan@gmail.com.

Thanks!

Documentation

Overview

Package base60 implements base60(天干地支) encoding.

Example
package main

import (
	"fmt"

	"github.com/chai2010/base60"
)

func main() {
	s0 := base60.Encode([]byte("你好"))
	fmt.Println(s0)

	s1 := base60.Decode("乙丑癸巳甲寅己亥丁卯甲申丁未甲午己巳")
	fmt.Println(string(s1))

}
Output:

乙丑癸巳甲寅己亥丁卯甲申丁未甲午己巳
你好

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s string) []byte

func Encode

func Encode(ba []byte) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL