gosimtool

package
v0.0.0-...-057c053 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Module          = "github.com/jellevandenhooff/gosim"
	OutputDirectory = ".gosim"
)

Variables

This section is empty.

Functions

func FindGoMod

func FindGoMod() (string, *modfile.File, error)

func FindGoModDir

func FindGoModDir() (string, error)

func GetNewPackageName

func GetNewPackageName(pkg string) string

func GetPathForPrecompiledTestBinary

func GetPathForPrecompiledTestBinary(t *testing.T, pkg string) string

func MakeGoModForTest

func MakeGoModForTest(goSimModDir, testModDir string, requires []string) error

MakeGoModForTest makes a go.mod and go.sum for tests that use the `gosim` CLI outside of the gosim module. It takes the go.mod from the gosim module strips it, and adds a `replace` directive pointing to the gosim module.

Only dependencies that are listed in the original go.mod work.

func PreparedTestBinName

func PreparedTestBinName(pkg string) string

func PreparedTestInfoName

func PreparedTestInfoName(pkg string) string

func ReplaceSpecialPackages

func ReplaceSpecialPackages(s string) string

Types

type BuildConfig

type BuildConfig struct {
	GOOS   string
	GOARCH string
	Race   bool
}

func (BuildConfig) AsDirname

func (b BuildConfig) AsDirname() string

type TranslateOutput

type TranslateOutput struct {
	RootOutputDir string
	Packages      []string                        // TODO: combine all this in a struct? also include input name?
	Deps          map[string]map[string]time.Time // pkg -> path -> time
}

Jump to

Keyboard shortcuts

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