mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-23 00:47:51 +00:00
15 lines
314 B
Go
15 lines
314 B
Go
package zipartifacts
|
|
|
|
import (
|
|
"encoding/base64"
|
|
)
|
|
|
|
// DecodeFileEntry decodes a base64-encoded string and returns the decoded content.
|
|
func DecodeFileEntry(entry string) (string, error) {
|
|
decoded, err := base64.StdEncoding.DecodeString(entry)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return string(decoded), nil
|
|
}
|