return myResty{} } func (client myResty) Post(url, contentType string, body io.Reader) (*http.Response, error) { resp, _ := client.R(). SetBody(body). ForceContentType(contentType). Post(“https://line.me/myshop/v1/inventory") return resp.RawResponse, nil } . . . func main() { newCli := NewRestyClient() cart := &cart{newCli} cart.checkout() } my_restry.go