package main

import (
	"gopkg.in/antage/eventsource.v0"
	"log"
	"net/http"
	"time"
)

func main() {
	es := eventsource.New(nil, nil)
	defer es.Close()
	http.Handle("/", http.FileServer(http.Dir("./public")))
	http.Handle("/events", es)
	go func() {
		for {
			es.SendEventMessage("hello", "", "")
			log.Printf("Hello has been sent (consumers: %d)", es.ConsumersCount())
			time.Sleep(2 * time.Second)
		}
	}()
	log.Print("Open URL http://localhost:8080/ in your browser.")
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		log.Fatal(err)
	}
}

package main

import (
	eventsource "../."
	"log"
	"net/http"
	"time"
)

func main() {
	es := eventsource.New(nil, nil)
	defer es.Close()
	http.Handle("/", http.FileServer(http.Dir("./public")))
	http.Handle("/events", es)
	go func() {
		for {
			es.SendEventMessage("hello", "", "")
			log.Printf("Hello has been sent (consumers: %d)", es.ConsumersCount())
			time.Sleep(2 * time.Second)
		}
	}()
	log.Print("Open URL http://localhost:8080/ in your browser.")
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		log.Fatal(err)
	}
}

--- 
+++ 
@@ -1,7 +1,7 @@
 package main
 
 import (
-	eventsource "../."
+	"gopkg.in/antage/eventsource.v0"
 	"log"
 	"net/http"
 	"time"
Revert "Revert "Use absolute import URL in example ( doesn't like relative URLs).""
`go get ./...` is full of surprises.

This reverts commit 323289ab27d509f732d2e9055d229de21a4d5d1c.
