mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-16 11:00:02 +02:00
Golint fixed for modules/setting (#262)
* golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
This commit is contained in:
parent
0a76d260fa
commit
94da472717
38 changed files with 178 additions and 167 deletions
|
@ -135,7 +135,7 @@ func (r *Renderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {
|
|||
|
||||
// Since this method could only possibly serve one link at a time,
|
||||
// we do not need to find all.
|
||||
if bytes.HasPrefix(link, []byte(setting.AppUrl)) {
|
||||
if bytes.HasPrefix(link, []byte(setting.AppURL)) {
|
||||
m := CommitPattern.Find(link)
|
||||
if m != nil {
|
||||
m = bytes.TrimSpace(m)
|
||||
|
@ -225,7 +225,7 @@ func cutoutVerbosePrefix(prefix string) string {
|
|||
if prefix[i] == '/' {
|
||||
count++
|
||||
}
|
||||
if count >= 3+setting.AppSubUrlDepth {
|
||||
if count >= 3+setting.AppSubURLDepth {
|
||||
return prefix[:i]
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string, metas map[string]strin
|
|||
for _, m := range ms {
|
||||
m = m[bytes.Index(m, []byte("@")):]
|
||||
rawBytes = bytes.Replace(rawBytes, m,
|
||||
[]byte(fmt.Sprintf(`<a href="%s/%s">%s</a>`, setting.AppSubUrl, m[1:], m)), -1)
|
||||
[]byte(fmt.Sprintf(`<a href="%s/%s">%s</a>`, setting.AppSubURL, m[1:], m)), -1)
|
||||
}
|
||||
|
||||
rawBytes = RenderIssueIndexPattern(rawBytes, urlPrefix, metas)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue