The ArtToken function does not return anything, but when it is called in the Creativity function its (non-existent) return value is assigned to claims. I’m guessing that you intended to return a Claims object from ArtToken.
article\main.go:48:13: not enough return values
have ()
want (*Claims)
article\main.go:51:9: not enough return values
have ()
want (*Claims)
article\main.go:64:13: not enough return values
have ()
want (*Claims)
article\main.go:67:9: not enough return values
have ()
want (*Claims)
article\main.go:71:9: not enough return values
have ()
want (*Claims)
type Claims struct {
User_id int `json:"user_id"`
Email string `json:"email"`
jwt.RegisteredClaims
}
All of your return statements in the ArtToken function will need to return a pointer to a Claim object, or nil. It appears that currently many of them don’t return anything.
Another thing, I found your parameter w in ArtToken pass in by value not by reference
so you WriteHead in ArtToken does not change anything for your main function
The first error was: referencing the function (Method == “GET”) in the function (Method== “POST”) . The second is for everything that you have indicated… But the main thing is