variables

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package variables provides a generator for creating random variable names nolint: gosec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenMock

type GenMock struct {
	Index int
}

GenMock mocks the var name generator

func (*GenMock) Generate

func (g *GenMock) Generate() string

Generate returns a mocked var name

type Generator

type Generator struct{}

Generator default generator implementation

func (*Generator) Generate

func (g *Generator) Generate() string

Generate generates a random variable name of length 10

type IGen

type IGen interface {
	Generate() string
}

IGen variable name generator interface

func NewGenerator

func NewGenerator() IGen

NewGenerator creates a new generator

func NewMock

func NewMock() IGen

NewMock creates new mock implementation of var name generator

Jump to

Keyboard shortcuts

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