Skip to content

azhao1981/go-opencc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-opencc

opencc wrapper for Golang

Install

Run 'go get github.com/azhao1981/go-opencc'

Example

package main

import "fmt"
import "github.com/azhao1981/go-opencc"

const (
	input = "中国鼠标软件打印机"
	config_s2t = "/usr/share/opencc/s2t.json"
	config_t2s = "/usr/share/opencc/t2s.json"
)

func main() {
	fmt.Println("Test Converter class:")
	c := opencc.NewConverter(config_s2t)
	defer c.Close()
	output := c.Convert(input)
	fmt.Println(output)
}

About

opencc wrapper for Golang

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 56.9%
  • C 43.1%