Skip to content

Golang package to parse the output from `INFO` redis command

License

Notifications You must be signed in to change notification settings

vlaualv/redis-info

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis Info parser

Parses output from INFO redis command.

Usage

package main

import (
    "os"
    "io/ioutil"
    "json"
    "fmt"

    "github.com/geoffreybauduin/redis-info"
)

func main() {
    in, err := ioutil.ReadAll(os.Stdin)
    if err != nil {
        panic(err)
    }
    info, err := redisinfo.Parse(string(in))
    if err != nil {
        panic(err)
    }
    data, err := json.Marshal(info)
    if err != nil {
        panic(err)
    }
    fmt.Printf("%s\n", data)
}

About

Golang package to parse the output from `INFO` redis command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%