github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/utils/net/net_test.go (about)

     1  package net
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/Asutorufa/yuhaiin/pkg/utils/assert"
     7  )
     8  
     9  func TestGetScheme(t *testing.T) {
    10  	scheme, _, err := GetScheme("http://www.baidu.com/dns-query")
    11  	assert.NoError(t, err)
    12  	assert.Equal(t, "http", scheme)
    13  }