27 lines
386 B
Go
27 lines
386 B
Go
|
package storage
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type File interface {
|
||
|
GetName() (string, error)
|
||
|
GetTime() (time.Time, error)
|
||
|
}
|
||
|
|
||
|
type GeneralFile struct {
|
||
|
name string
|
||
|
time time.Time
|
||
|
}
|
||
|
|
||
|
func (g GeneralFile) GetName() (string, error) {
|
||
|
return g.name, nil
|
||
|
}
|
||
|
|
||
|
func (g GeneralFile) GetTime() (time.Time, error) {
|
||
|
return g.time, nil
|
||
|
}
|
||
|
|
||
|
func GetEmptyFileList() []File {
|
||
|
var files []File
|
||
|
return files
|
||
|
}
|