mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
24 lines
363 B
Go
24 lines
363 B
Go
package utils
|
|
|
|
import (
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
func CSVRemoveFormulaStart(input string) string {
|
|
if input == "" {
|
|
return input
|
|
}
|
|
if len(input) > 0 && strings.ContainsAny(input[0:1], "=@+-") {
|
|
return "'" + input
|
|
}
|
|
return input
|
|
}
|
|
|
|
func CSVFromDate(d *time.Time) string {
|
|
if d == nil {
|
|
return ""
|
|
}
|
|
return CSVRemoveFormulaStart(d.Format(time.RFC3339))
|
|
}
|