(envPath, key string)
| 96 | } |
| 97 | |
| 98 | func GetEnvValueByKey(envPath, key string) (string, error) { |
| 99 | envMap, err := godotenv.Read(envPath) |
| 100 | if err != nil { |
| 101 | return "", err |
| 102 | } |
| 103 | value, ok := envMap[key] |
| 104 | if !ok { |
| 105 | return "", fmt.Errorf("key %s not found in %s", key, envPath) |
| 106 | } |
| 107 | return value, nil |
| 108 | } |
| 109 | |
| 110 | func isStartWithZero(value string) bool { |
| 111 | if strings.HasPrefix(value, "0") && len(value) > 1 { |