package main

import (
	"bytes"
	"fmt"
	"golang.source-fellows.com/seminar/options-pattern/pkg"
	"net/http"
)

func main() {
	fmt.Println("Starting server")

	server := pkg.NewServer(pkg.WithBinding(":8080"))
	server.Handler = http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
		fmt.Fprintln(writer, "Hello World")
	})

	fmt.Println(server.ListenAndServe())

	config := pkg.ServerConfig{}
	config[pkg.BindingConfigName] = 8080
	pkg.NewServerWithConfig(config)

	server2 := pkg.NewServerBuilder().AddBinding(":8080").Build()
	fmt.Println(server2)

	bytes.NewReader()

}
