You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: proof_service_reddit.go
    path of file: ./repos/client/go/externals
    
    the code of the file until where you have to start completion: // Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.

package externals

import (
	"net/url"
	"regexp"
	"strings"

	libkb "github.com/keybase/client/go/libkb"
	keybase1 "github.com/keybase/client/go/protocol/keybase1"
	jsonw "github.com/keybase/go-jsonw"
)

// ==========================================
    
func urlReencode(s string) string {
	// Reddit interprets plusses in the query string differently depending
	// on whether the user is using the old or new (2018) design, and
	// on whether it's the title or body of the post.
	// old,     *, '+'   -> ' '
	// old,     *, '%2B' -> '+'
	// new, title, '+'   -> ' '
	// new, title, '%2B' -> ' '
	// new,  body, '+'   -> '+'
	// new,  body, '%2B' -> '+'

	// Examples:
	// https://www.reddit.com/r/test/submit?text=content+fmt%0Aplus+x%2By%20z&title=title+fmt%0Aplus+x%2By%20z
	// old: https://www.reddit.com/r/test/comments/8eee0e/title_fmt_plus_xy_z/
	// new: https://www.reddit.com/r/test/comments/8eelwf/title_fmt_plus_x_y_z/

	// Replace '(', ")" and "'" so that URL-detection works in Linux
	// Padding is not needed now, but might be in the future depending on
	// changes we make
	rxx := regexp.MustCompile(`[()'+]`)
	s = rxx.ReplaceAllStringFunc(s, func(r string) string {
		switch r {
		case `(`:
			return `%28`
		case `)`:
			return `%29`
		case `'`:
			return `%27`
		case `+`:
			// HTTPArgs.EncodeToString has encoded ' ' -> '+'
			// we recode '+' -> '%20'.
			return `%20`
		default:
			return r
		}
	})
	return s
}