alwindoss / morse

Morse Code Library in Go

Home Page:https://dalw.in/morse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

morse

Go Report Card CircleCI codecov Go Reference License

Morse Code Library in Go

Download and Use

go get -u -v github.com/alwindoss/morse

or

dep ensure -add github.com/alwindoss/morse

Sample Usage

package main

import (
	"fmt"
	"strings"

	"github.com/alwindoss/morse"
)

func main() {
	h := morse.NewHacker()
	morseCode, err := h.Encode(strings.NewReader("Convert this to Morse"))
	if err != nil {
		return
	}
	// Morse Code is: -.-. --- ...- . .-. - / - .... .. ... / - --- / -- --- .-. ... .
	fmt.Printf("Morse Code is: %s\n", string(morseCode))
}

About

Morse Code Library in Go

https://dalw.in/morse

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 94.2%Language:Shell 5.8%