Skip to content

Commit

Permalink
feat: Add convenience methods for pointer creation (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
unfunco committed May 9, 2024
1 parent de05838 commit 90623c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
manifest-file: .github/release-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update the version number
if: ${{ steps.release.outputs.prs_created == 'true' }}
if: steps.release.outputs.prs_created && steps.release.outputs.pr != null
run: |
git config pull.ff only
git config pull.rebase true
git checkout ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
git pull origin ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
version=$(jq -r '."."' .github/release-manifest.json)
Expand All @@ -65,4 +65,4 @@ jobs:
git config --local user.email "[email protected]"
git add version.go
git commit -m "chore: Configure the version number"
git push
git push origin ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
6 changes: 6 additions & 0 deletions anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,9 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v any) (*http.Respon

return resp, err
}

// Float64 returns a pointer to a float64 value.
func Float64(v float64) *float64 { return &v }

// Int returns a pointer to an int value.
func Int(v int) *int { return &v }

0 comments on commit 90623c7

Please sign in to comment.