12 lines
186 B
Go
12 lines
186 B
Go
package telegram
|
|
|
|
import "net/url"
|
|
|
|
func (entity *MessageEntity) ParseURL() (*url.URL, error) {
|
|
if entity.Type == EntityTextLink {
|
|
return url.Parse(entity.URL)
|
|
}
|
|
|
|
return nil, nil
|
|
}
|