query
This commit is contained in:
parent
ac00969597
commit
769af27bf9
|
|
@ -1,7 +1,6 @@
|
||||||
package timeslice
|
package timeslice
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -12,38 +11,14 @@ type Manager struct {
|
||||||
GoNum int
|
GoNum int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Manager) String() (string, error) {
|
|
||||||
b, err := json.Marshal(t)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return string(b), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Process struct {
|
type Process struct {
|
||||||
manager *Manager
|
manager *Manager
|
||||||
taskCount int
|
taskCount int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Process) String() (string, error) {
|
|
||||||
b, err := json.Marshal(t)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return string(b), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Task struct {
|
type Task struct {
|
||||||
Process *Process
|
Process *Process
|
||||||
CurrentStartTime time.Time
|
CurrentStartTime time.Time
|
||||||
CurrentEndTime time.Time
|
CurrentEndTime time.Time
|
||||||
TaskID int
|
TaskID int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Task) String() (string, error) {
|
|
||||||
b, err := json.Marshal(t)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return string(b), nil
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue