mirror of
https://github.com/golang/go
synced 2024-11-18 15:14:44 -07:00
10 lines
282 B
Plaintext
10 lines
282 B
Plaintext
|
package template
|
||
|
|
||
|
// Basic test of expression refactoring.
|
||
|
// (Types are not important in this case; it could be done with gofmt -r.)
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
func before(t time.Time) time.Duration { return time.Now().Sub(t) }
|
||
|
func after(t time.Time) time.Duration { return time.Since(t) }
|