Skip to content

Commit

Permalink
fix(http3): fix all relevant fields to be pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
Integralist committed Dec 4, 2023
1 parent df23056 commit 96230fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions fastly/http3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
type HTTP3 struct {
CreatedAt *time.Time `mapstructure:"created_at" json:"created_at"`
DeletedAt *time.Time `mapstructure:"deleted_at" json:"deleted_at"`
FeatureRevision int `mapstructure:"feature_revision" json:"feature_revision"`
ServiceID string `mapstructure:"service_id" json:"service_id"`
ServiceVersion int `mapstructure:"version" json:"version"`
FeatureRevision *int `mapstructure:"feature_revision" json:"feature_revision"`
ServiceID *string `mapstructure:"service_id" json:"service_id"`
ServiceVersion *int `mapstructure:"version" json:"version"`
UpdatedAt *time.Time `mapstructure:"updated_at" json:"updated_at"`
}

Expand Down
8 changes: 4 additions & 4 deletions fastly/http3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func TestClient_HTTP3(t *testing.T) {
t.Fatal(err)
}

if h.FeatureRevision != 1 {
t.Errorf("bad feature_revision: %d", h.FeatureRevision)
if *h.FeatureRevision != 1 {
t.Errorf("bad feature_revision: %d", *h.FeatureRevision)
}

// Get HTTP3 status
Expand All @@ -42,8 +42,8 @@ func TestClient_HTTP3(t *testing.T) {
t.Fatal(err)
}

if gh.FeatureRevision != 1 {
t.Errorf("bad feature_revision: %d", gh.FeatureRevision)
if *gh.FeatureRevision != 1 {
t.Errorf("bad feature_revision: %d", *gh.FeatureRevision)
}

// Disable HTTP3
Expand Down

0 comments on commit 96230fa

Please sign in to comment.