Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.11 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.11 KB

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))
}