fake

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockGetSemVerFn

func NewMockGetSemVerFn(s *semver.Version, err error) func() (*semver.Version, error)

NewMockGetSemVerFn creates new MockGetSemver function for MockVersioner.

func NewMockGetVersionStringFn

func NewMockGetVersionStringFn(s string) func() string

NewMockGetVersionStringFn creates new MockGetVersionString function for MockVersioner.

func NewMockInConstraintsFn

func NewMockInConstraintsFn(b bool, err error) func() (bool, error)

NewMockInConstraintsFn creates new MockInConstraintsString function for MockVersioner.

Types

type MockVersioner

type MockVersioner struct {
	MockGetVersionString func() string
	MockGetSemVer        func() (*semver.Version, error)
	MockInConstraints    func() (bool, error)
}

MockVersioner provides mock version operations.

func (*MockVersioner) GetSemVer

func (m *MockVersioner) GetSemVer() (*semver.Version, error)

GetSemVer calls the underlying MockGetSemVer.

func (*MockVersioner) GetVersionString

func (m *MockVersioner) GetVersionString() string

GetVersionString calls the underlying MockGetVersionString.

func (*MockVersioner) InConstraints

func (m *MockVersioner) InConstraints(c string) (bool, error)

InConstraints calls the underlying MockInConstraints.

Jump to

Keyboard shortcuts

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