fake

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fake contains semantic version mocks.

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(_ 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