MCPcopy Create free account
hub / github.com/exercism/cli / New

Function New

workspace/workspace.go:27–37  ·  view source on GitHub ↗

New returns a configured workspace.

(dir string)

Source from the content-addressed store, hash-verified

25
26// New returns a configured workspace.
27func New(dir string) (Workspace, error) {
28 _, err := os.Lstat(dir)
29 if err != nil {
30 return Workspace{}, err
31 }
32 dir, err = filepath.EvalSymlinks(dir)
33 if err != nil {
34 return Workspace{}, err
35 }
36 return Workspace{Dir: dir}, nil
37}
38
39// PotentialExercises are a first-level guess at the user's exercises.
40// It looks at the workspace structurally, and guesses based on

Callers 5

exerciseMethod · 0.92
TestWorkspaceExercisesFunction · 0.70
TestExerciseDirFunction · 0.70

Calls

no outgoing calls

Tested by 3

TestWorkspaceExercisesFunction · 0.56
TestExerciseDirFunction · 0.56