owoify_go

package module
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 7 Imported by: 1

README

owoify-go

Turning your worst nightmare into a Go module.

Go

This is a Go port of mohan-cao's owoify-js, which will help you turn any string into nonsensical babyspeak similar to LeafySweet's infamous Chrome extension.

Just like my other Owoify ports, three levels of owoness are available:

  1. owo (default): The most vanilla one.
  2. uwu: The moderate one.
  3. uvu: Litewawwy unweadabwal.

Please refer to the original owoify-js repository for more information.

Seriously, if you have seen my other ports, you probably have already known the details.

Reason for development

Because pkg.go.dev doesn't have any owoify package. And since I have already ported it to several languages, I might as well just keep porting it.

Install instructions

On command line, simply run:

go get github.com/deadshot465/owoify-go

Usage

owoify-go is implemented as a function inside the package owoify_go. That means you don't need to create an instance of any class; instead, just call the method owoify with the package name.

package main

import (
	"fmt"
	"github.com/deadshot465/owoify-go"
)

func main() {
	fmt.Println(owoify_go.Owoify("This is the string to owo! Kinda cute, isn't it?", Owo))
	fmt.Println(owoify_go.Owoify("This is the string to owo! Kinda cute, isn't it?", Uvu))
}

// Output:
// This is teh stwing two owo! Kinda cute, isn't it?
// fwis is teh stwing two owo(/ =ω=)/ Kinda cute(/ =ω=)/ isn't it?

Disclaimer

As usual, I'm writing this package for both practicing and bots' needs. Performance is NOT guaranteed.

That being said, all regular expressions are declared beforehand rather than being declared inside a function. This module utilizes sync.once to make sure all initialization of regular expressions will only run once. That should be able to avoid the performance cost of building regular expressions every time the method is called.

See also

  • owoify-js - The original owoify-js repository.
  • Owoify.Net - The C# port of Owoify written by me.
  • Owoify++ - The C++ header-only port of Owoify written by me.
  • owoify_rs - The Rust port of Owoify written by me.
  • owoify-py - The Python port of Owoify written by me.
  • owoify_dart - The Dart port of Owoify written by me.
  • owoify_rb - The Ruby port of Owoify written by me.

Documentation

Overview

Package owoify_go is a Go port of mohan-cao's owoify-js library (https://github.com/mohan-cao/owoify-js).

Example and README can be found on owoify-go's GitHub repo: https://github.com/deadshot465/owoify-go

Basically, you would and should only call owoify-go's Owoify function, and pass in the source string to be owoified and the desired owoness.

owoify_go.Owoify("Hello, World!", "uvu")

The returned string will be the owoified source string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Owoify

func Owoify(source string, level Owoness) string

Owoify is the main entry point of Owoify. Available owoness levels are (from lowest to highest): Owo, Uwu, Uvu. Panics when passing an invalid owoness level.

func Uvuify added in v2.1.0

func Uvuify(source string) string

Uvuify owoifies the given source string using Uvu owoness level.

func Uwuify added in v2.1.0

func Uwuify(source string) string

Uwuify owoifies the given source string using Uwu owoness level.

Types

type Owoness

type Owoness int
const (
	Owo Owoness = iota
	Uwu
	Uvu
)

Directories

Path Synopsis
structures

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL