Create a Golang function that performs Huffman encoding on a given input string and returns the encoded string along with the frequency table used for encoding.

```go
package main

import (
	"container/heap"
	"fmt"
)

type node struct {
	character  rune
	frequency  int
	left, right *node
}

func (n node) isLeaf() bool {
	return n.left == nil && n.right == nil
}

type frequencyTable map[rune]int

func buildFrequencyTable(input string) frequencyTable {
	ft := make(frequencyTable)
	for _, char := range input {
		ft[char]++
	}
	return ft
}

type minHeap []*node

func (h minHeap) Len() int           { return len(h) }
func (h minHeap) Less(i, j int) bool { return h[i].frequency < h[j].frequency }
func (h minHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *minHeap) Push(x interface{}) {
	*h = append(*h, x.(*node))
}

func (h *minHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func buildHuffmanTree(ft frequencyTable) *node {
	h := &minHeap{}
	heap.Init(h)

	for char, freq := range ft {
		heap.Push(h, &node{character: char, frequency: freq})
	}

	for h.Len() > 1 {
		node1 := heap.Pop(h).(*node)
		node2 := heap.Pop(h).(*node)

		newNode := &node{
			frequency: node1.frequency + node2.frequency,
			left:      node1,
			right:     node2,
		}

		heap.Push(h, newNode)
	}

	return heap.Pop(h).(*node)
}

func buildHuffmanCodeTable(tree *node) map[rune]string {
	codeTable := make(map[rune]string)
	var traverse func(n *node, code string)

	traverse = func(n *node, code string) {
		if n.isLeaf() {
			codeTable[n.character] = code
			return
		}

		traverse(n.left, code+"0")
		traverse(n.right, code+"1")
	}

	traverse(tree, "")
	return codeTable
}

func huffmanEncode(input string) (string, frequencyTable) {
	ft := buildFrequencyTable(input)
	tree := buildHuffmanTree(ft)
	codeTable := buildHuffmanCodeTable(tree)

	var encoded string
	for _, char := range input {
		encoded += codeTable[char]
	}

	return encoded, ft
}

func main() {
	input := "this is an example of a huffman tree"
	encoded, freqTable := huffmanEncode(input)
	fmt.Println("Encoded:", encoded)
	fmt.Println("Frequency table:", freqTable)
}
```

This Golang function performs Huffman encoding on a given input string and returns the encoded string along with the frequency table used for encoding. The function first builds a frequency table from the input string, then constructs a Huffman tree based on the frequency table. Finally, it generates a code table from the Huffman tree and encodes the input string using the code table.