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

chore: cleanup deprecated functions #93

Merged
merged 1 commit into from
Oct 2, 2023
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
30 changes: 0 additions & 30 deletions http/json.go

This file was deleted.

71 changes: 0 additions & 71 deletions http/json_test.go

This file was deleted.

42 changes: 0 additions & 42 deletions ptr/ptr.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,3 @@ package ptr
func Of[T any](v T) *T {
return &v
}

// Bool converts a bool into a bool pointer.
//
// Deprecated: Use Of instead.
func Bool(b bool) *bool {
return &b
}

// Float32 converts a float32 into a float32 pointer.
//
// Deprecated: Use Of instead.
func Float32(f float32) *float32 {
return &f
}

// Float64 converts a float64 into a float64 pointer.
//
// Deprecated: Use Of instead.
func Float64(f float64) *float64 {
return &f
}

// Int converts an int into an int pointer.
//
// Deprecated: Use Of instead.
func Int(i int) *int {
return &i
}

// Int64 converts an int64 into an int64 pointer.
//
// Deprecated: Use Of instead.
func Int64(i int64) *int64 {
return &i
}

// String converts a string into a string pointer.
//
// Deprecated: Use Of instead.
func String(s string) *string {
return &s
}
48 changes: 0 additions & 48 deletions ptr/ptr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,3 @@ func TestOf(t *testing.T) {

assert.Exactly(t, &want, got)
}

func TestBool(t *testing.T) {
want := true

got := ptr.Bool(want)

assert.Exactly(t, &want, got)
}

func TestFloat32(t *testing.T) {
want := float32(1.0)

got := ptr.Float32(want)

assert.Exactly(t, &want, got)
}

func TestFloat64(t *testing.T) {
want := float64(1.0)

got := ptr.Float64(want)

assert.Exactly(t, &want, got)
}

func TestInt(t *testing.T) {
want := 1

got := ptr.Int(want)

assert.Exactly(t, &want, got)
}

func TestInt64(t *testing.T) {
want := int64(1)

got := ptr.Int64(want)

assert.Exactly(t, &want, got)
}

func TestString(t *testing.T) {
want := "foo"

got := ptr.String(want)

assert.Exactly(t, &want, got)
}
Loading