title: Go: declaring a slice inside a struct?
body: <p>I have the following code:</p>
  
  <pre><code>type room struct {
      width float32
      length float32
  }
  type house struct{
      s := make([]string, 3)
      name string
      roomSzSlice := make([]room, 3)
  } 
  
  func main() {
  
  
  }
  </code></pre>
  
  <p>And when i try to build and run it i get the following errors:</p>
  
  <pre><code>c:\go\src\test\main.go:10: syntax error: unexpected :=
  c:\go\src\test\main.go:11: non-declaration statement outside function body
  c:\go\src\test\main.go:12: non-declaration statement outside function body
  c:\go\src\test\main.go:13: syntax error: unexpected }
  </code></pre>
  
  <p>What did i do wrong?</p>
  
  <p>Thanks!</p>