@@ -141,9 +141,9 @@ srv, ts := prep(t)
141141}
142142BKT
143143`
144- text = strings .Replace (text , "BKT" , "```" , - 1 )
144+ text = strings .ReplaceAll (text , "BKT" , "```" )
145145 j := fmt .Sprintf (`{"text": %q, "locator":{"url": "https://radio-t.com/blah1", "site": "radio-t"}}` , text )
146- j = strings .Replace (j , "\n " , "\\ n" , - 1 )
146+ j = strings .ReplaceAll (j , "\n " , "\\ n" )
147147
148148 resp , err := post (t , ts .URL + "/api/v1/preview" , j )
149149 assert .NoError (t , err )
@@ -169,9 +169,9 @@ func TestRest_PreviewCode(t *testing.T) {
169169func main(aa string) int {return 0}
170170BKT
171171`
172- text = strings .Replace (text , "BKT" , "```" , - 1 )
172+ text = strings .ReplaceAll (text , "BKT" , "```" )
173173 j := fmt .Sprintf (`{"text": %q, "locator":{"url": "https://radio-t.com/blah1", "site": "radio-t"}}` , text )
174- j = strings .Replace (j , "\n " , "\\ n" , - 1 )
174+ j = strings .ReplaceAll (j , "\n " , "\\ n" )
175175
176176 resp , err := post (t , ts .URL + "/api/v1/preview" , j )
177177 assert .NoError (t , err )
0 commit comments