package test

import (
	"fmt"
	"net/http"

	req "../../../core/request"
	res "../../../core/response"
)

type Profile struct {
	Name    string
	Hobbies []string
}

//Inicial : Func
func Inicial(w http.ResponseWriter, r *http.Request, vars []string) {
	// fmt.Println(vars[0])
	// fmt.Fprintf(w, "Hello Route, %q", html.EscapeString(r.URL.Path))
	profile := Profile{"Alex", []string{"snowboarding", "programming"}}

	if err := r.ParseForm(); err != nil {
		fmt.Printf("ParseForm() err: %v", err)
		return
	}

	fmt.Println(req.Method())

	res.SetCode(404)
	res.JSON(profile)
}
