.
This commit is contained in:
@@ -34,7 +34,7 @@ func (u *URL) Scan(value interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *URL) String() string {
|
||||
func (u URL) String() string {
|
||||
return u.Full
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ func ParseURL(input string, descr string) (*URL, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: Input %s Error %w", ErrURLParse, input, err)
|
||||
}
|
||||
return &URL{Protocol: protocol, Hostname: hostname, Port: port, Path: path, Descr: descr, Full: u.String()}, nil
|
||||
full := fmt.Sprintf("%s://%s:%d%s", protocol, hostname, port, path)
|
||||
return &URL{Protocol: protocol, Hostname: hostname, Port: port, Path: path, Descr: descr, Full: full}, nil
|
||||
}
|
||||
|
||||
//func GeminiUrltoJSON(g URL) string {
|
||||
|
||||
Reference in New Issue
Block a user