Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add convenience methods for pointer creation #24

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "48985810+david-letterman@users.noreply.github.com"
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 }
Loading