Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1 KB

README.md

File metadata and controls

37 lines (27 loc) · 1 KB

baseEmoji

Encode things in Emoji because reasons.

You probably shouldn't use this in any kind of serious production environment.

Usage

GoDoc Build Status

    text := "Homura did nothing wrong."
    enc := baseEmoji.DefaultEncoding
    
    // Encode the text string
    encoded, err := enc.Encode([]byte(text))
    if err != nil {
        fmt.Printf("Error encoding: %s\n", err)
        return
    }
    fmt.Printf(file, "%s\n", encoded)
    
    // Write the encoded string to a text file
    encoding.WriteFile("output.txt")
    
    // Decode the dext string
    decoded, err := enc.Decode(encoded.ToBytes())
    if err != nil {
        fmt.Printf("Error decoding: %s\n", err)
        return
    }
    fmt.Printf(file, "%s\n", decoded)

License

See LICENSE.md