File: url_go19.go

package info (click to toggle)
golang-github-go-openapi-spec 1%3A0.20.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 3,728 kB
  • sloc: makefile: 3
file content (14 lines) | stat: -rw-r--r-- 194 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//go:build go1.19
// +build go1.19

package spec

import "net/url"

func parseURL(s string) (*url.URL, error) {
	u, err := url.Parse(s)
	if err == nil {
		u.OmitHost = false
	}
	return u, err
}