You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crate/wireexample/cmd/example_01/wire_gen.go

34 lines
631 B
Go

// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
// Injectors from wire.go:
// Approach A
func InjectGuessWithoutMock(rander Rander) *Guess {
guess := NewGuess(rander)
return guess
}
// Approach B
func InjectRealGuess() *Guess {
defaultRander := NewRander()
guess := NewGuess(defaultRander)
return guess
}
// Approach B
func InjectMockGuess() *GuessWithMock {
mockRander := &MockRander{}
guess := NewGuess(mockRander)
guessWithMock := &GuessWithMock{
Guess: guess,
Mock: mockRander,
}
return guessWithMock
}