Skip to content

Commit

Permalink
v3 beta release docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Feb 1, 2025
1 parent 5dc45ff commit 0d59a83
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions assets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ a .r-icon {
background-color: #282a36;
}

.resty-go-min {
margin-top: .3rem;
text-align: center;
font-size: 0.8em;
}

.global-msg {
margin: 0 0 2rem;
padding: .5rem 1rem .5rem .75rem;
Expand Down
8 changes: 5 additions & 3 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type: docs
<code>require resty.dev/v3 {{% param Resty.V3.Version %}}</code>
</pre>
</div>
<div class="resty-go-min">Minimum required Go version is {{% param Resty.V3.GoMinVersion %}}</div>

{{% columns %}}
```go
Expand All @@ -49,8 +50,8 @@ fmt.Println(res.Request.TraceInfo())
// Server-Sent Events Client
es := NewEventSource().
SetURL("https://sse.dev/test").
OnMessage(func(a any) {
fmt.Println(a.(*resty.Event))
OnMessage(func(e any) {
fmt.Println(e.(*resty.Event))
}, nil)

err := es.Get()
Expand Down Expand Up @@ -88,7 +89,7 @@ This website represents Resty v3 and above. For previous v2 documentation, refer
* Download to file
* Redirect Policies
* Circuit Breaker Policy
* Debug mode with human-readable log
* Debug mode with human-readable, JSON log
* Load Balancer and Service Discovery
* Response body limit & Unlimited reads
* Bazel support
Expand All @@ -112,5 +113,6 @@ Resty provides various ways to enhance its functionality by implementing its int
* Request Functions
* Redirect Policy
* Transport RoundTripper
* Debug Log Formatter
* Logger

8 changes: 8 additions & 0 deletions content/docs/upgrading-to-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ bookHidden: true

Resty v3 release brings many new features, enhancements, and breaking changes. This page outlines upgrading Resty to v3.

{{% hint info %}}
Minimum required go version is `{{% param Resty.V3.GoMinVersion %}}`
{{% /hint %}}

## Update go.mod

Resty v3 provides a Go vanity URL.
Expand Down Expand Up @@ -87,6 +91,10 @@ I made necessary breaking changes to improve Resty and open up future growth pos
* `Request.GenerateCurlCommand` => [Request.CurlCmd]({{% godoc v3 %}}Request.CurlCmd)
* `Request.AddRetryCondition` => [Request.AddRetryConditions]({{% godoc v3 %}}Request.AddRetryConditions)

#### Response

* `Response.Time` => [Response.Duration]({{% godoc v3 %}}Response.Duration)

#### Multipart

* `MultipartField.Param` => [MultipartField.Name]({{% godoc v3 %}}MultipartField)
Expand Down
3 changes: 2 additions & 1 deletion hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ params:
GitHubRepo: https://github.com/go-resty/resty
GitHubSlug: go-resty/resty
V3:
Version: v3.0.0-alpha.10
Version: v3.0.0-beta.1
GoMinVersion: go1.21
Vanity: resty.dev/v3
GoDocLinkPrefix: https://pkg.go.dev/resty.dev/v3#

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/inject/content-before.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="global-msg global-msg-warning" align="center">
<p><strong>NOTE: Currently, Resty v3 is in alpha release, and documentation is in-progress ...</strong></p>
<p><strong>NOTE: Currently, Resty v3 is in beta release</strong></p>
</div>

0 comments on commit 0d59a83

Please sign in to comment.