xeger

package module
v0.0.0-...-9025486 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 6 Imported by: 0

README

go-xeger

go-xeger is a golang module that generates random strings from a regular expression.

Installation

To install go-xeger:

$ go get github.com/takahiromiyamoto/go-xeger
Usage
package main

import (
  "fmt"

  "github.com/takahiromiyamoto/go-xeger"
)

func main() {
  x, err := xeger.NewXeger("[0-9]+")
  if err != nil {
    panic(err)
  }

  fmt.Println(x.Generate())
}
Contributing

Contributions are very welcome. Please open a tracking issue or pull request and we can work to get things merged in.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Xeger

type Xeger struct {
	// contains filtered or unexported fields
}

func NewXeger

func NewXeger(regex string) (*Xeger, error)

func (*Xeger) Generate

func (x *Xeger) Generate() string

Jump to

Keyboard shortcuts

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