mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 03:26:57 +00:00
move more args of Upstream() to upstream Options
This commit is contained in:
parent
2f6b280fce
commit
a7bb3448a4
4 changed files with 56 additions and 30 deletions
13
server/utils/utils_test.go
Normal file
13
server/utils/utils_test.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestTrimHostPort(t *testing.T) {
|
||||
assert.EqualValues(t, "aa", TrimHostPort([]byte("aa")))
|
||||
assert.EqualValues(t, "", TrimHostPort([]byte(":")))
|
||||
assert.EqualValues(t, "example.com", TrimHostPort([]byte("example.com:80")))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue