MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / get_env_patch

Function get_env_patch

pre_commit/languages/golang.py:70–85  ·  view source on GitHub ↗
(venv: str, version: str)

Source from the content-addressed store, hash-verified

68
69
70def get_env_patch(venv: str, version: str) -> PatchesT:
71 if version == 'system':
72 return (
73 ('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))),
74 )
75
76 return (
77 ('GOROOT', os.path.join(venv, '.go')),
78 ('GOTOOLCHAIN', 'local'),
79 (
80 'PATH', (
81 os.path.join(venv, 'bin'), os.pathsep,
82 os.path.join(venv, '.go', 'bin'), os.pathsep, Var('PATH'),
83 ),
84 ),
85 )
86
87
88@functools.lru_cache

Callers 1

in_envFunction · 0.70

Calls 1

VarClass · 0.90

Tested by

no test coverage detected