File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ func SetAddress(addr string) func(*Exporter) error {
8383// Generally only used when create a new Exporter.
8484func SetEndpoint (rawurl string ) func (* Exporter ) error {
8585 return func (e * Exporter ) error {
86+ if rawurl == "" {
87+ return nil
88+ }
8689 u , err := url .Parse (rawurl )
8790 if err != nil {
8891 return errors .Wrap (err , "failed to parse url" )
@@ -97,6 +100,9 @@ func SetEndpoint(rawurl string) func(*Exporter) error {
97100// Generally only used when create a new Exporter.
98101func SetFastcgi (rawurl string ) func (* Exporter ) error {
99102 return func (e * Exporter ) error {
103+ if rawurl == "" {
104+ return nil
105+ }
100106 u , err := url .Parse (rawurl )
101107 if err != nil {
102108 return errors .Wrap (err , "failed to parse url" )
You can’t perform that action at this time.
0 commit comments