@@ -34,8 +34,6 @@ import (
3434 "testing"
3535 "time"
3636
37- "github.com/ryanfowler/fetch/internal/core"
38-
3937 "github.com/coder/websocket"
4038 "github.com/klauspost/compress/gzip"
4139 "github.com/klauspost/compress/zstd"
@@ -750,7 +748,7 @@ func TestMain(t *testing.T) {
750748 t .Run ("range request" , func (t * testing.T ) {
751749 t .Parallel ()
752750 var expectedRange atomic.Pointer [string ]
753- expectedRange .Store (core . PointerTo ("" ))
751+ expectedRange .Store (new (""))
754752 server := startServer (func (w http.ResponseWriter , r * http.Request ) {
755753 exp := expectedRange .Load ()
756754 if r .Header .Get ("Range" ) != * exp {
@@ -769,22 +767,22 @@ func TestMain(t *testing.T) {
769767 assertExitCode (t , 0 , res )
770768
771769 // Range header with no start.
772- expectedRange .Store (core . PointerTo ("bytes=-1023" ))
770+ expectedRange .Store (new ("bytes = - 1023 "))
773771 res = runFetch (t , fetchPath , server .URL , "--range" , "-1023" )
774772 assertExitCode (t , 0 , res )
775773
776774 // Range header with no end.
777- expectedRange .Store (core . PointerTo ("bytes=1023-" ))
775+ expectedRange .Store (new ("bytes = 1023 - "))
778776 res = runFetch (t , fetchPath , server .URL , "--range" , "1023-" )
779777 assertExitCode (t , 0 , res )
780778
781779 // Range header with start and end.
782- expectedRange .Store (core . PointerTo ("bytes=0-1023" ))
780+ expectedRange .Store (new ("bytes = 0 - 1023 "))
783781 res = runFetch (t , fetchPath , server .URL , "--range" , "0-1023" )
784782 assertExitCode (t , 0 , res )
785783
786784 // Multiple ranges.
787- expectedRange .Store (core . PointerTo ("bytes=0-1023, 2047-3070" ))
785+ expectedRange .Store (new ("bytes = 0 - 1023 , 2047 - 3070 "))
788786 res = runFetch (t , fetchPath , server .URL , "-r" , "0-1023" , "-r" , "2047-3070" )
789787 assertExitCode (t , 0 , res )
790788 })
@@ -1092,39 +1090,39 @@ func TestMain(t *testing.T) {
10921090 fds := & descriptorpb.FileDescriptorSet {
10931091 File : []* descriptorpb.FileDescriptorProto {
10941092 {
1095- Name : strPtr ("stream.proto" ),
1096- Package : strPtr ("streampkg" ),
1097- Syntax : strPtr ("proto3" ),
1093+ Name : new ("stream.proto "),
1094+ Package : new ("streampkg "),
1095+ Syntax : new ("proto3 "),
10981096 MessageType : []* descriptorpb.DescriptorProto {
10991097 {
1100- Name : strPtr ("StreamRequest" ),
1098+ Name : new ("StreamRequest "),
11011099 Field : []* descriptorpb.FieldDescriptorProto {
11021100 {
1103- Name : strPtr ("value" ),
1104- Number : int32Ptr ( 1 ),
1101+ Name : new ("value "),
1102+ Number : new ( int32 ( 1 ) ),
11051103 Type : & strType ,
11061104 },
11071105 },
11081106 },
11091107 {
1110- Name : strPtr ("StreamResponse" ),
1108+ Name : new ("StreamResponse "),
11111109 Field : []* descriptorpb.FieldDescriptorProto {
11121110 {
1113- Name : strPtr ("count" ),
1114- Number : int32Ptr ( 1 ),
1111+ Name : new ("count "),
1112+ Number : new ( int32 ( 1 ) ),
11151113 Type : & int64Type ,
11161114 },
11171115 },
11181116 },
11191117 },
11201118 Service : []* descriptorpb.ServiceDescriptorProto {
11211119 {
1122- Name : strPtr ("StreamService" ),
1120+ Name : new ("StreamService "),
11231121 Method : []* descriptorpb.MethodDescriptorProto {
11241122 {
1125- Name : strPtr ("ClientStream" ),
1126- InputType : strPtr (".streampkg.StreamRequest" ),
1127- OutputType : strPtr (".streampkg.StreamResponse" ),
1123+ Name : new ("ClientStream "),
1124+ InputType : new (".streampkg .StreamRequest "),
1125+ OutputType : new (".streampkg .StreamResponse "),
11281126 ClientStreaming : & boolTrue ,
11291127 },
11301128 },
@@ -3196,6 +3194,3 @@ func startMTLSServer(t *testing.T, certPath, keyPath, caCertPath string) *httpte
31963194 server .StartTLS ()
31973195 return server
31983196}
3199-
3200- func strPtr (s string ) * string { return & s }
3201- func int32Ptr (i int32 ) * int32 { return & i }
0 commit comments