Update comments

This commit is contained in:
Marc Di Luzio 2020-05-30 23:17:59 +01:00
parent 6f9d400d8b
commit 5d250edb6b
2 changed files with 4 additions and 1 deletions

View file

@ -8,8 +8,8 @@ import (
"github.com/mdiluz/rove/pkg/rove"
)
// NewRouter sets up the server mux
func NewRouter() (router *mux.Router) {
// Create a new router
router = mux.NewRouter().StrictSlash(true)
// Set up the handlers

View file

@ -7,10 +7,12 @@ import (
"net/url"
)
// Connection is the container for a simple connection to the server
type Connection struct {
host string
}
// NewConnection sets up a new connection to a server host
func NewConnection(host string) *Connection {
return &Connection{
host: host,
@ -22,6 +24,7 @@ type ServerStatus struct {
Ready bool `json:"ready"`
}
// Status returns the current status of the server
func (c *Connection) Status() (status ServerStatus, err error) {
url := url.URL{
Scheme: "http",