MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / withGoEnv

Function withGoEnv

tooling/scripts/go-env.mjs:5–18  ·  view source on GitHub ↗
(extraEnv = {})

Source from the content-addressed store, hash-verified

3import { resolve } from 'node:path'
4
5export function withGoEnv(extraEnv = {}) {
6 const env = {
7 ...process.env,
8 ...extraEnv,
9 }
10
11 if (!env.GOCACHE) {
12 const cacheDir = resolve(tmpdir(), 'zennotes-go-build-cache')
13 mkdirSync(cacheDir, { recursive: true })
14 env.GOCACHE = cacheDir
15 }
16
17 return env
18}

Callers 4

buildGoServerFunction · 0.90

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected