Go语言中的地图序列化和反序列化问题

I am doing the basic serialization and deserialization of map as suggested in this example. But I get the following error:

panic: EOF

goroutine 1 [running]:
main.load(0x81147e0, 0x1840a378)
    /home/naresh/Desktop/Work/GoEventHandler/test.go:39 +0x2cf
main.main()
    /home/naresh/Desktop/Work/GoEventHandler/test.go:16 +0xe5
exit status 2

Can anyone tell me what I am doing wrong in the following code:

package main

import (
    "fmt"
    "bytes"
    "encoding/gob"
)

func main() {   
    org := map[string]string{"hello": "world"}
    store(org)

    var loadedMap map[string]string
    load(&loadedMap)

    fmt.Println(loadedMap)   
}

func store(data interface{}) {
    m := new(bytes.Buffer) 
    enc := gob.NewEncoder(m)

    err := enc.Encode(data)
    if err != nil {
        panic(err)
    }
}

func load(e interface{}) {        
    p := new(bytes.Buffer) 
    dec := gob.NewDecoder(p)

    err := dec.Decode(e)
    if err != nil {
        panic(err)
    }
}

Decoding is a process that requires the encoded information which will be in buffer used for encoding. Pass that to the decoder.

package main

import (
    "bytes"
    "encoding/gob"
    "fmt"
)

func main() {
    org := map[string]string{"hello": "world"}
    buf := store(org)

    loadedMap := make(map[string]string)
    load(&loadedMap, buf)

    fmt.Println(loadedMap)
}

func store(data interface{}) *bytes.Buffer {
    m := new(bytes.Buffer)
    enc := gob.NewEncoder(m)

    err := enc.Encode(data)
    if err != nil {
        panic(err)
    }
    return m
}

func load(e interface{}, buf *bytes.Buffer) {
    dec := gob.NewDecoder(buf)

    err := dec.Decode(e)
    if err != nil {
        panic(err)
    }
}