Simple HTTP server that performs a regex test
The call to regexp.MatchString is the only really expensive part of your code. Do you need full regexp support? If you just want to find substrings, you should use strings.Contains instead of the regexp package. Otherwise, there's no way around it. It might be worth looking at what each request looks like: you could call strings.Contains for the simple ones (that don't use any regexp features) and only use regexp.MatchString when needed.

Some comments on style:


Your NewMessageController method is useless. Just have your callers use new(controllers.MessageController).
Use t.Fatalf instead of log.Fatalf in your tests.
Build strings in a consistent manner:

var (
    longString = "your long string"
    subString = "home"
    host = "http://localhost:8080"
)
func TestPostMessage(t *testing.T) {
    url := fmt.Sprintf("%s/messages?body=%s&amp;pattern=%s", host, longString, subString)
    …
}