-1

I had a variable payload, it is too long here just a part.

payload := strings.NewReader("json=%7B%22rent_content_layout%22%3A%22Original%22%2C%22start_verylargetext_enabled%22%3Afalse%2C%22auto_large_mode") 

is any way to make the one line var data to multi line or make it human readable using golang, for bash or shell we use \n, is any trick to line break it using golang

1
  • 4
    what do you mean you would use \n? Do you want to add newlines into the string? If you want to break up the long string, just do that and concatenate the parts with +. Commented Aug 15, 2022 at 17:25

1 Answer 1

1

Simply do the string concatenation with the + operator and break the string into small parts.

payload := strings.NewReader( "json=%7B%22" + "rent_content_layout%22%3A%22" + "Original%22%2C%22" + "start_verylargetext_enabled%22%3A" + "false%2C%22auto_large_mode") 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.