You've already forked VptPassiveAdapter
添加endpoint,测试s3
This commit is contained in:
@ -10,13 +10,16 @@ import (
|
||||
|
||||
func ParseStartStopTime(filePath string, relativeDate time.Time) (time.Time, time.Time, error) {
|
||||
split := strings.Split(filePath, config.Config.FileName.TimeSplit)
|
||||
if len(split) != 2 {
|
||||
if len(split) == 0 {
|
||||
return time.Time{}, time.Time{}, fmt.Errorf("无法解析时间范围")
|
||||
}
|
||||
startTime, err := ParseTime(split[0], relativeDate)
|
||||
if err != nil {
|
||||
return time.Time{}, time.Time{}, err
|
||||
}
|
||||
if len(split) == 1 {
|
||||
return startTime, startTime, nil
|
||||
}
|
||||
stopTime, err := ParseTime(split[1], relativeDate)
|
||||
if err != nil {
|
||||
return startTime, startTime, nil
|
||||
|
Reference in New Issue
Block a user