无法构建简单的golang代码-切片文字语法

I am trying to build a simple golang program using go-dockerclient

package main

import (
        docker "github.com/fsouza/go-dockerclient"
)

func main () {
        h := &docker.HostConfig {
                Memory: 4194304,
                MemorySwap: -1,
                CPUShares: 5,
                NetworkMode: "host",
        }
        client, err := docker.NewClient("unix:///var/run/docker.sock")
        config := &docker.Config {
                Env: ["FOO=foo"],
                Image: "redis",
        }
        opts := docker.CreateContainerOptions {
                Config: config,
                HostConfig: hostConfig,
        }
        container, _ := client.CreateContainer(opts)
        err = client.StartContainer(container.ID)
}

This gives me:

:~/gosrc/src/github.com/achanda$ go build
# github.com/achanda
./main.go:16: syntax error: unexpected comma
./main.go:22: non-declaration statement outside function body
./main.go:23: non-declaration statement outside function body
./main.go:24: non-declaration statement outside function body
./main.go:25: syntax error: unexpected }

I don't seem to find anything wrong with the syntax (admittedly a noob though). What is the problem?

Slice literals should look like this:

[]string{"a", "b", "c"}

Not like this:

["a", "b", "c"]

So change this:

Env: ["FOO=foo"],

To this:

Env: []string{"FOO=foo"},