Skip to content

Commit 12285aa

Browse files
authored
Merge pull request #3245 from cloudflare/release-please--branches--develop--changes--next
2 parents 6c240fb + 59c72bf commit 12285aa

File tree

1,308 files changed

+139444
-47561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,308 files changed

+139444
-47561
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.1.0"
2+
".": "4.0.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 1336
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-181e01b5bd06b9225e1d9e83df10e41fde7035040d740433d44f1c04ed7a80bb.yml
1+
configured_endpoints: 1493
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de70b033c163b7a4d4a11c5c66a7bcf7162020c433006b0d6b2d3e43c5b24df4.yml

Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
brew "go"

CHANGELOG.md

Lines changed: 242 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
## Setting up the environment
22

3-
### Install Go 1.18+
3+
To set up the repository, run:
44

5-
Install go by following relevant directions [here](https://go.dev/doc/install).
5+
```sh
6+
$ ./scripts/bootstrap
7+
$ ./scripts/build
8+
```
9+
10+
This will install all the required dependencies and build the SDK.
11+
12+
You can also [install go 1.18+ manually](https://go.dev/doc/install).
613

714
## Modifying/Adding code
815

@@ -14,7 +21,7 @@ modify the contents of the `lib/` and `examples/` directories.
1421

1522
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
1623

17-
```bash
24+
```go
1825
# add an example to examples/<your-example>/main.go
1926

2027
package main
@@ -24,36 +31,36 @@ func main() {
2431
}
2532
```
2633

27-
```bash
28-
go run ./examples/<your-example>
34+
```sh
35+
$ go run ./examples/<your-example>
2936
```
3037

3138
## Using the repository from source
3239

3340
To use a local version of this library from source in another project, edit the `go.mod` with a replace
3441
directive. This can be done through the CLI with the following:
3542

36-
```bash
37-
go mod edit -replace github.com/cloudflare/cloudflare-go/v3=/path/to/cloudflare-go
43+
```sh
44+
$ go mod edit -replace github.com/cloudflare/cloudflare-go/v3=/path/to/cloudflare-go
3845
```
3946

4047
## Running tests
4148

4249
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
4350

44-
```bash
51+
```sh
4552
# you will need npm installed
46-
npx prism mock path/to/your/openapi.yml
53+
$ npx prism mock path/to/your/openapi.yml
4754
```
4855

49-
```bash
50-
go test ./...
56+
```sh
57+
$ ./scripts/test
5158
```
5259

5360
## Formatting
5461

5562
This library uses the standard gofmt code formatter:
5663

57-
```bash
58-
gofmt -s -w .
64+
```sh
65+
$ ./scripts/format
5966
```

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2024 Cloudflare
189+
Copyright 2025 Cloudflare
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cloudflare Go API Library
22

3-
<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3"><img src="https://pkg.go.dev/badge/github.com/cloudflare/cloudflare-go/v3.svg" alt="Go Reference"></a>
3+
<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4"><img src="https://pkg.go.dev/badge/github.com/cloudflare/cloudflare-go/v3.svg" alt="Go Reference"></a>
44

55
The Cloudflare Go library provides convenient access to [the Cloudflare REST
66
API](https://developers.cloudflare.com/api) from applications written in Go. The full API of this library can be found in [api.md](api.md).
@@ -11,7 +11,7 @@ API](https://developers.cloudflare.com/api) from applications written in Go. The
1111

1212
```go
1313
import (
14-
"github.com/cloudflare/cloudflare-go/v3" // imported as cloudflare
14+
"github.com/cloudflare/cloudflare-go/v4" // imported as cloudflare
1515
)
1616
```
1717

@@ -22,7 +22,7 @@ Or to pin the version:
2222
<!-- x-release-please-start-version -->
2323

2424
```sh
25-
go get -u 'github.com/cloudflare/cloudflare-go/v3@v3.1.0'
25+
go get -u 'github.com/cloudflare/cloudflare-go/v3@v4.0.0'
2626
```
2727

2828
<!-- x-release-please-end -->
@@ -42,9 +42,9 @@ import (
4242
"context"
4343
"fmt"
4444

45-
"github.com/cloudflare/cloudflare-go/v3"
46-
"github.com/cloudflare/cloudflare-go/v3/option"
47-
"github.com/cloudflare/cloudflare-go/v3/zones"
45+
"github.com/cloudflare/cloudflare-go/v4"
46+
"github.com/cloudflare/cloudflare-go/v4/option"
47+
"github.com/cloudflare/cloudflare-go/v4/zones"
4848
)
4949

5050
func main() {
@@ -112,7 +112,7 @@ if res.Name == "" {
112112
// true if `"name"` is either not present or explicitly null
113113
res.JSON.Name.IsNull()
114114

115-
// true if the `"name"` key was not present in the repsonse JSON at all
115+
// true if the `"name"` key was not present in the response JSON at all
116116
res.JSON.Name.IsMissing()
117117

118118
// When the API returns data that cannot be coerced to the expected type:
@@ -370,9 +370,9 @@ middleware has been applied.
370370
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
371371

372372
1. Changes that only affect static types, without breaking runtime behavior.
373-
1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
373+
1. Changes to library internals which are technically public but not intended or documented for external use.
374374
1. Changes that we do not expect to impact the vast majority of users in practice.
375375

376-
> [!WARNING]
377-
> In addition to the above, changes to type names, structure or methods _may_ occur as we stabilise the automated codegen pipeline. This will be removed in the future once we are further along and the service owner OpenAPI schemas have reached a higher maturity level where changes are not as constant.
378-
> If this isn't suitable for your project, we recommend pinning to a known version or using the previous major version.
376+
## Contributing
377+
378+
See [the contributing documentation](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)