()
| 730 | } |
| 731 | |
| 732 | func GetCurrentBinaryPath() (string, error) { |
| 733 | executable, err := os.Executable() |
| 734 | if err != nil { |
| 735 | return "", err |
| 736 | } |
| 737 | |
| 738 | // Resolve the full path (to avoid issues with symbolic links) |
| 739 | executablePath, err := filepath.EvalSymlinks(executable) |
| 740 | if err != nil { |
| 741 | return "", err |
| 742 | } |
| 743 | |
| 744 | return executablePath, nil |
| 745 | } |
| 746 | |
| 747 | func ToAbsPath(logger *zap.Logger, originalPath string) string { |
| 748 | path := originalPath |