Skip to content

Commit 1c93996

Browse files
committed
Remove unused Float32Ptr function and its associated tests
1 parent 95b6719 commit 1c93996

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

cmd/generate/utils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import (
55
"strings"
66
)
77

8-
// Float32Ptr returns a pointer to a float32 value
9-
func Float32Ptr(f float32) *float32 {
10-
return &f
11-
}
12-
138
// ExtractJSON extracts JSON content from a string that might be wrapped in markdown
149
func ExtractJSON(content string) string {
1510
// Remove markdown code blocks

cmd/generate/utils_test.go

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,6 @@ import (
44
"testing"
55
)
66

7-
func TestFloat32Ptr(t *testing.T) {
8-
tests := []struct {
9-
name string
10-
input float32
11-
expected float32
12-
}{
13-
{
14-
name: "positive value",
15-
input: 3.14,
16-
expected: 3.14,
17-
},
18-
{
19-
name: "negative value",
20-
input: -2.5,
21-
expected: -2.5,
22-
},
23-
{
24-
name: "zero value",
25-
input: 0.0,
26-
expected: 0.0,
27-
},
28-
{
29-
name: "large value",
30-
input: 999999.99,
31-
expected: 999999.99,
32-
},
33-
}
34-
35-
for _, tt := range tests {
36-
t.Run(tt.name, func(t *testing.T) {
37-
result := Float32Ptr(tt.input)
38-
if result == nil {
39-
t.Fatalf("Float32Ptr returned nil")
40-
}
41-
if *result != tt.expected {
42-
t.Errorf("Float32Ptr(%f) = %f, want %f", tt.input, *result, tt.expected)
43-
}
44-
})
45-
}
46-
}
47-
487
func TestExtractJSON(t *testing.T) {
498
tests := []struct {
509
name string

0 commit comments

Comments
 (0)