From 06ba9b3e492ca47f6f966bd7bd6044809b989c30 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 21 May 2026 18:13:15 -0400 Subject: tidy --- lulu.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lulu.go') diff --git a/lulu.go b/lulu.go index 53ce2fd..69a8ede 100644 --- a/lulu.go +++ b/lulu.go @@ -135,9 +135,9 @@ func (c *Client) StartInteriorValidationBasic(srcUrl string) (uint, error) { } func (c *Client) startInteriorValidation(payload any) (uint, error) { - var rec InteriorValidation - err := c.postDecode(validateInteriorPath, payload, http.StatusCreated, &rec) - return rec.Id, err + var val InteriorValidation + err := c.postDecode(validateInteriorPath, payload, http.StatusCreated, &val) + return val.Id, err } // GetInteriorValidation retrieves information about an interior file @@ -149,11 +149,11 @@ func (c *Client) GetInteriorValidation(id uint) (InteriorValidation, error) { if err != nil { return InteriorValidation{}, pkgErr(err) } - var rec InteriorValidation - if err := c.getDecode(path, &rec); err != nil { + var val InteriorValidation + if err := c.getDecode(path, &val); err != nil { return InteriorValidation{}, pkgErr(err) } - return rec, nil + return val, nil } // CoverDimensions calculates the required dimensions of the cover for a @@ -193,12 +193,12 @@ func (c *Client) ValidateCover(ctx context.Context, srcUrl string, mfg PkgId, np // https://api.lulu.com/docs/#tag/Files-validation/operation/Validate-Cover_create func (c *Client) StartCoverValidation(srcUrl string, mfg PkgId, npages uint) (uint, error) { payload := validateCoverReq{srcUrl, mfg, npages} - var rec CoverValidation - err := c.postDecode(validateCoverPath, payload, http.StatusCreated, &rec) + var val CoverValidation + err := c.postDecode(validateCoverPath, payload, http.StatusCreated, &val) if err != nil { return 0, pkgErr(err) } - return rec.Id, nil + return val.Id, nil } // GetCoverValidiation retrieves information about a cover file @@ -210,11 +210,11 @@ func (c *Client) GetCoverValidation(id uint) (CoverValidation, error) { if err != nil { return CoverValidation{}, pkgErr(err) } - var rec CoverValidation - if err := c.getDecode(path, &rec); err != nil { + var val CoverValidation + if err := c.getDecode(path, &val); err != nil { return CoverValidation{}, pkgErr(err) } - return rec, nil + return val, nil } // Cost calculates the cost of a hypothetical print order without -- cgit v1.2.3