INNER CODE UNIT · Go

genMock

openservicemesh/osm · mockspec/generate.go:58

func genMock(ruleOptions []string) {
	for i := range ruleOptions {
		ruleOptions[i] = strings.TrimSpace(ruleOptions[i])
	}

	packageName := ruleOptions[0]
	destinationPath := ruleOptions[1]
	selfPackagePath := ruleOptions[2]
	importPath := ruleOptions[2]
	interfaces := ruleOptions[3]

	// Generate the mocks
	cmdList := []string{
		"run", "github.com/golang/mock/mockgen",
		"-package", packageName,
		"-destination", destinationPath,
		"-self_package", selfPackagePath,
		importPath,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…