Just implement update logic in Methods where it is needed, since if there is no pointer I cannot hand it to any function or method
This commit is contained in:
9
date.go
9
date.go
@@ -24,15 +24,6 @@ func NewDate(t time.Time) *Date {
|
||||
}
|
||||
}
|
||||
|
||||
// Update updates the Date.
|
||||
func (d *Date) Update() {
|
||||
if d == nil {
|
||||
d = NewDate(time.Now())
|
||||
} else {
|
||||
d.DateTime = DateTime(time.Now())
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the Date for incompatibilities with RFC4287. It returns an
|
||||
// error.
|
||||
func (d *Date) Check() error {
|
||||
|
Reference in New Issue
Block a user