title: Copy a struct content into uint64 in Go
body: <p>I want to copy a strcuture's values into uint64, what's the proper method without unsafe?</p>
  
  <pre><code>package main
  
  import "fmt"
  
  type T struct {
      id [7]byte
      no uint8
  }
  
  func main() {
      t1 := T{[7]byte{'A', 'B', 'C', 'D', 'E', 'F', 'G'}, 7}
      var u uint64
  
      //TODO: copy t1's content into u (both id and no)
      //u = *((*uint64)(unsafe.Pointer(&amp;t1)))
  
      fmt.Println(t1, u)
  }
  </code></pre>