// Create a new message with a payload msg := &beehive.Msg{ Data: []byte("hello, world!"), } // Attach some metadata to the message msg.SetMetadata("count", 42) // Retrieve the payload from the message payload := msg.Data // Retrieve metadata from the message count, ok := msg.GetMetadata("count").(int) if !ok { fmt.Println("count metadata not found") }In the first example, we create a new message with a payload of "hello, world!". In the second example, we attach some metadata to the message using the SetMetadata method. In the third example, we retrieve the payload from the message using the Data field. In the fourth example, we retrieve metadata from the message using the GetMetadata method. Note that we need to type-assert the value returned by GetMetadata to an int, since metadata values can be of any type. Overall, the beehive package library provides a powerful and flexible platform for building high-performance network functions in Go.