1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-16 15:21:33 +00:00

Performance enhancement by using strings.Builder or bytes.Buffer

This commit is contained in:
Darren Shepherd
2020-03-01 21:33:11 -07:00
parent 69ad517ced
commit 21eb3aa63c

View File

@@ -200,7 +200,7 @@ func (u *urlBuilder) ResourceLinkByID(schema *types.Schema, id string) string {
}
func (u *urlBuilder) constructBasicURL(version types.APIVersion, parts ...string) string {
buffer := bytes.Buffer{}
buffer := strings.Builder{}
buffer.WriteString(u.responseURLBase)
if version.Path == "" {