Rename constant ContentTypeHtml to make private
This commit is contained in:
parent
e619ea0751
commit
e50488b364
|
@ -14,7 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ContentTypeHtml = "text/html"
|
contentTypeHtml = "text/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
func defaultLinkHandler(link string) (*LinkInfo, error) {
|
func defaultLinkHandler(link string) (*LinkInfo, error) {
|
||||||
|
@ -69,7 +69,7 @@ func defaultLinkHandler(link string) (*LinkInfo, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch contentType {
|
switch contentType {
|
||||||
case ContentTypeHtml:
|
case contentTypeHtml:
|
||||||
err = retrieveHtmlLinkTitle(ret, link)
|
err = retrieveHtmlLinkTitle(ret, link)
|
||||||
default:
|
default:
|
||||||
ret.Title = fmt.Sprintf("%s (%s, %s)", path.Base(u.Path), contentType, ByteCountDecimal(contentLength))
|
ret.Title = fmt.Sprintf("%s (%s, %s)", path.Base(u.Path), contentType, ByteCountDecimal(contentLength))
|
||||||
|
|
Loading…
Reference in New Issue