(goos string)
| 506 | } |
| 507 | |
| 508 | func pluginExtension(goos string) string { |
| 509 | switch strings.ToLower(strings.TrimSpace(goos)) { |
| 510 | case "darwin", "mac", "macos", "osx": |
| 511 | return ".dylib" |
| 512 | case "windows": |
| 513 | return ".dll" |
| 514 | default: |
| 515 | return ".so" |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | func writeFileAtomic(targetPath string, data []byte, mode os.FileMode) error { |
| 520 | targetDir := filepath.Dir(targetPath) |
no outgoing calls