You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test.go
    path of file: ./repos/cockroach/pkg/cmd/dev
    
    the code of the file until where you have to start completion: // Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the fi
    
func (d *dev) getGoTestArgs(ctx context.Context, testArgs string) ([]string, error) {
	var goTestArgs []string
	if testArgs != "" {
		// The test output directory defaults to wherever "go test" is running,
		// which for us is somewhere in the sandbox. When passing arguments for
		// go test (-{mem,cpu}profile, -trace for e.g.), we may be interested in
		// output files. For that reason, configure it to write (if anything) to the
		// workspace by default.
		//
		// TODO(irfansharif): We could also elevate the go test flags that do write
		// output into top-level dev flags (like --rewrite) and only selectively
		// configure -test.outputdir and the sandbox writable path.
		workspace, err := d.getWorkspace(ctx)
		if err != nil {
			return nil, err
		}
		goTestArgs = append(goTestArgs,
			"--test_arg", fmt.Sprintf("-test.outputdir=%s", workspace),
			fmt.Sprintf("--sandbox_writable_path=%s", filepath.Join(workspace)),
		)

		parts, err := shlex.Split(testArgs)
		if err != nil {
			return nil, err
		}
		for _, part := range parts {
			goTestArgs = append(goTestArgs, "--test_arg", part)
		}
	}
	return goTestArgs, nil
}