mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
22 lines
254 B
Go
22 lines
254 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
t, err := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fn := func() error {
|
|
_, err := t.GobEncode()
|
|
return err
|
|
}
|
|
fmt.Println(fn())
|
|
}
|
|
|
|
// Output:
|
|
// <nil>
|