// GetUserHandler handle GET /user/<username>

GetUserHandler handle GET /user/
// GetUserHandler handle GET / user / <username >
func GetUserHandler(c *routing.Context) error {
	userService := getUserService(c)
	user := userService.GetUserByUsername(c.Param("username"))
	if len(user) == 0 {
		return http.NotFound(c, "User not found", UsersServiceName())
	}
	user[0].Password = ""
	userJSON, _ := json.Marshal(user[0])
	return http.Ok(c, string(userJSON), UsersServiceName())
}
func GetUserHandler ( c * routing . Context ) error { userService := getUserService ( c ) user := userService . GetUserByUsername ( c . Param ( " " ) ) if len ( user ) == 0 { return http . NotFound ( c , " " , UsersServiceName ( ) ) } user [ 0 ] . Password = " " userJSON , _ := json . Marshal ( user [ 0 ] ) return http . Ok ( c , string ( userJSON ) , UsersServiceName ( ) ) }
GetUserHandler handle GET /user
GetUserHandler handle GET / user
// Get user service
