...

Source file src/github.com/mitchellh/copystructure/copier_time_test.go

Documentation: github.com/mitchellh/copystructure

     1  package copystructure
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  )
     7  
     8  func TestTimeCopier(t *testing.T) {
     9  	v := time.Now().UTC()
    10  	result, err := timeCopier(v)
    11  	if err != nil {
    12  		t.Fatalf("err: %s", err)
    13  	}
    14  	if result.(time.Time) != v {
    15  		t.Fatalf("bad: %#v\n\n%#v", v, result)
    16  	}
    17  }
    18  

View as plain text