()
| 246 | } |
| 247 | |
| 248 | func getCjsModuleLexerDownloadURL() (string, error) { |
| 249 | var arch string |
| 250 | var os string |
| 251 | |
| 252 | switch runtime.GOARCH { |
| 253 | case "arm64": |
| 254 | arch = "aarch64" |
| 255 | case "amd64", "386": |
| 256 | arch = "x86_64" |
| 257 | default: |
| 258 | return "", errors.New("unsupported architecture: " + runtime.GOARCH) |
| 259 | } |
| 260 | |
| 261 | switch runtime.GOOS { |
| 262 | case "darwin": |
| 263 | os = "apple-darwin" |
| 264 | case "linux": |
| 265 | os = "unknown-linux-gnu" |
| 266 | default: |
| 267 | return "", errors.New("unsupported os: " + runtime.GOOS) |
| 268 | } |
| 269 | |
| 270 | return fmt.Sprintf("https://github.com/esm-dev/cjs-module-lexer/releases/download/v%s/cjs-module-lexer-%s-%s.gz", cjsModuleLexerVersion, arch, os), nil |
| 271 | } |
no outgoing calls
no test coverage detected