Restructure application
This commit is contained in:
21
pkg/history/history.go
Normal file
21
pkg/history/history.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package history
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Record struct {
|
||||
Query string `json:"query"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
}
|
||||
|
||||
func New() []Record {
|
||||
return make([]Record, 0)
|
||||
}
|
||||
|
||||
func NewRecord(query string) Record {
|
||||
return Record{
|
||||
Query: query,
|
||||
Timestamp: time.Now().String(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user