Skip to content

Commit

Permalink
fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Sep 12, 2023
1 parent cdca12b commit 92dcfd9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/sink/sink_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

package sink

import (
"net/url"
"strings"
)

// Type is the type of sink.
type Type int

Expand Down Expand Up @@ -91,3 +96,8 @@ func IsStorageScheme(scheme string) bool {
func IsPulsarScheme(scheme string) bool {
return scheme == PulsarScheme || scheme == PulsarSSLScheme
}

// GetScheme returns the scheme of the url.
func GetScheme(url *url.URL) string {
return strings.ToLower(url.Scheme)
}

0 comments on commit 92dcfd9

Please sign in to comment.