Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/y-bash/go-gaga

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/y-bash/go-gaga

  • v0.0.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

go-gaga (Japanese language utility)

Installation

For using the library:

Linux:

$ go get github.com/y-bash/go-gaga

Windows:

>go get github.com/y-bash/go-gaga

Next, to install the command (If you use binaries):

Linux:

$ cd $GOPATH/src/github.com/y-bash/go-gaga
$ make install

Windows:

>cd %GOPATH%\src\github.com\y-bash\go-gaga
>go install ./...

Usage

Library

Norm
import "github.com/y-bash/go-gaga"

s := "GaGa is not がガガ"
fmt.Println(s)

n := gaga.Norm(gaga.Fold) // gaga.Fold == gaga.LatinToNarrow | gaga.KanaToWide
fmt.Println(n.String(s))

n.setFlag(gaga.LatinToWide | gaga.AlphaToUpper | gaga.KanaToHiragana)
fmt.Println(n.String(s))

Output:

GaGa is not がガガ
GaGa is not がガガ
GAGA IS NOT ががが
Vert
import "github.com/y-bash/go-gaga"

s := gaga.Vert("閑さや\n岩にしみ入る\n蝉の声")
fmt.Print(s)

Output:

蝉岩閑
のにさ
声しや
  み  
  入  
  る

Commands

Norm

Linux:

$ echo "ABCアイウ" | norm
ABCアイウ

Windows:
(with wecho comand in the gaga)

>wecho ABCアイウ | norm
ABCアイウ
Vert

Linux:

$ echo -e "閑さや\n岩にしみ入る\n蝉の声" | vert
蝉岩閑
のにさ
声しや
  み  
  入  
  る

Windows:
(with wecho comand in the gaga)

>wecho 閑さや\n岩にしみ入る\n蝉の声 | vert
蝉岩閑
のにさ
声しや
  み
  入
  る
Norm & Vert

Linux:

$ echo -e "閑さや\n岩にしみ入る\n蝉の声" | norm -flag KanaToWideKatakana | vert
蝉岩閑
ノニサ
声シヤ
  ミ
  入
  ル

Windows:
(with wecho comand in the gaga)

>wecho 閑さや\n岩にしみ入る\n蝉の声 | norm -flag KanaToWideKatakana | vert
蝉岩閑
ノニサ
声シヤ
  ミ
  入
  ル

License

This software is released under the MIT License, see LICENSE.

Author

y-bash

FAQs

Package last updated on 21 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc