diff --git a/main.go b/main.go deleted file mode 100644 index d477410..0000000 --- a/main.go +++ /dev/null @@ -1,15 +0,0 @@ -package main - -import ( - "fmt" - "io" - "os" -) - -func printMessage(w io.Writer, msg string) { - fmt.Fprint(w, msg) -} - -func main() { - printMessage(os.Stdout, "Hello MQTT\n") -} diff --git a/main_test.go b/main_test.go deleted file mode 100644 index e7ee9fd..0000000 --- a/main_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "bytes" - "testing" -) - -func TestPrintMessage(t *testing.T) { - buffer := bytes.Buffer{} - printMessage(&buffer, "Hello MQTT\n") - got := buffer.String() - want := "Hello MQTT\n" - - if got != want { - t.Errorf("Error. Got %s but wanted %s", got, want) - } -}