Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alwindoss/morse
Morse Code Library in Go
https://github.com/alwindoss/morse
decode encode go golang library morse morse-code
Last synced: about 2 months ago
JSON representation
Morse Code Library in Go
- Host: GitHub
- URL: https://github.com/alwindoss/morse
- Owner: alwindoss
- License: bsd-3-clause
- Created: 2018-08-15T05:31:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-30T10:12:15.000Z (over 2 years ago)
- Last Synced: 2024-08-30T21:38:41.943Z (3 months ago)
- Topics: decode, encode, go, golang, library, morse, morse-code
- Language: Go
- Homepage: https://pkg.go.dev/github.com/alwindoss/morse
- Size: 28.3 KB
- Stars: 81
- Watchers: 4
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - morse - Library to convert to and from morse code. (Miscellaneous / Uncategorized)
- zero-alloc-awesome-go - morse - Library to convert to and from morse code. (Miscellaneous / Uncategorized)
- awesome-go - morse - Morse Code Library in Go - ★ 38 (Miscellaneous)
- awesome-go-extra - morse - 08-15T05:31:31Z|2022-02-23T12:04:39Z| (Microsoft Office / Uncategorized)
- awesome-go-zh - morse
README
# morse
[![Go Report Card](https://goreportcard.com/badge/github.com/alwindoss/morse)](https://goreportcard.com/report/github.com/alwindoss/morse)
[![CircleCI](https://circleci.com/gh/alwindoss/morse.svg?style=svg)](https://circleci.com/gh/alwindoss/morse)
[![codecov](https://codecov.io/gh/alwindoss/morse/branch/master/graph/badge.svg)](https://codecov.io/gh/alwindoss/morse)
[![Go Reference](https://pkg.go.dev/badge/github.com/alwindoss/morse.svg)](https://pkg.go.dev/github.com/alwindoss/morse)
[![License](https://img.shields.io/pypi/l/Django.svg)](https://github.com/alwindoss/morse/blob/master/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
```golang
package mainimport (
"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))
}
```