UNPKG

serverless-offline

Version:

Emulate AWS λ and API Gateway locally when developing your Serverless project

17 lines (13 loc) 277 B
import { execa } from "execa" export default async function checkGoVersion() { let goVersion try { const { stdout } = await execa("go", ["version"]) if (/go1.\d+/g.test(stdout)) { goVersion = "1.x" } } catch { // @ignore } return goVersion }