diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-07 17:49:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 09:49:46 +0000 |
commit | 56ae853ca0f7255cc669d802b741922fd8670c3b (patch) | |
tree | 132ba83a8a238e1119738416083f17c668ee3442 /modules/secret/secret.go | |
parent | 377e0139b0233f2b5419af42ad783f82cf9ce0ba (diff) | |
download | gitea-56ae853ca0f7255cc669d802b741922fd8670c3b.tar.gz gitea-56ae853ca0f7255cc669d802b741922fd8670c3b.zip |
Simplify template helper functions (#24570)
To avoid bloating the template helper functions, some functions could be
provided by type methods.
And the new code `data-line-type="{{.GetHTMLDiffLineType}}"` reads
better than `data-line-type="{{DiffLineTypeToStr .GetType}}"`
After the fix, screenshots (the same as before):
<details>
![image](https://user-images.githubusercontent.com/2114189/236657918-20ce01e0-1192-443e-aeb4-6b3fe1aa2102.png)
![image](https://user-images.githubusercontent.com/2114189/236657950-ee19727f-a1fc-4133-afc7-e5d1a8c1783f.png)
</details>
Diffstat (limited to 'modules/secret/secret.go')
0 files changed, 0 insertions, 0 deletions