Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zacharybear/typer
✨ Typer is a printer whose output style simulates a typewriter.
https://github.com/zacharybear/typer
console go golang golang-library golang-package logging style typer typewriter
Last synced: about 1 month ago
JSON representation
✨ Typer is a printer whose output style simulates a typewriter.
- Host: GitHub
- URL: https://github.com/zacharybear/typer
- Owner: ZacharyBear
- License: mit
- Created: 2024-04-25T09:19:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T03:28:30.000Z (10 months ago)
- Last Synced: 2024-11-15T09:49:43.837Z (3 months ago)
- Topics: console, go, golang, golang-library, golang-package, logging, style, typer, typewriter
- Language: Go
- Homepage:
- Size: 20.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Reference](https://img.shields.io/badge/Reference-white?logo=go&labelColor=white&color=91DFFB)](https://pkg.go.dev/github.com/ZenkieBear/typer)
# Typer
Typer is a printer whose output style simulates a typewriter.![Shown](doc/show.gif)
# Experience now!
## Prerequisite
Installed [Go](https://go.dev/doc/install) and [Git](https://git-scm.com/downloads) on your personal computer.## Clone the repository to your PC
```shell
git clone https://github.com/ZenkieBear/typer
```## Run the `main.go` file
```shell
go run main.go
```# Import Typer to your application
## Install Typer
```shell
go get github.com/ZenkieBear/typer
```## Import typer to your go file
```go
import "github.com/ZenkieBear/typer/typer"
```## Use Typer
```go
func some() {
typer.Print("Hey Judy\n")
typer.Println("Don't be afraid")
}
```# Configuration
Typer supports custom configuration.You can create a `typer.Typer`, and define properties according to your preferences.
```go
func demo() {
// ...
myTyper := typer.Typer{
Base: 300,
FloatRange: 50,
Printer: fmt.Print,
}if err := myTyper.Print("Hello!"); err != nil {
fmt.Println(err.Error())
}
// ...
}
```# License
Typer is licensed under [MIT](LICENSE)