Skip to content

Commit 04e2ba4

Browse files
committed
feat: spectrum: add EndpointString()
1 parent ec83a8f commit 04e2ba4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

endpoint.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package spectrum
2+
3+
import "strings"
4+
5+
func EndpointString(method, path string) string {
6+
method = strings.ToUpper(strings.TrimSpace(method))
7+
path = strings.TrimSpace(path)
8+
return strings.Join([]string{method, path}, " ")
9+
}

0 commit comments

Comments
 (0)