gitea/modules/util
wxiaoguang 50a72e7a83
Use a general approach to access custom/static/builtin assets (#24022)
The idea is to use a Layered Asset File-system (modules/assetfs/layered.go)

For example: when there are 2 layers: "custom", "builtin", when access
to asset "my/page.tmpl", the Layered Asset File-system will first try to
use "custom" assets, if not found, then use "builtin" assets.

This approach will hugely simplify a lot of code, make them testable.

Other changes:

* Simplify the AssetsHandlerFunc code
* Simplify the `gitea embedded` sub-command code

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-04-12 18:16:45 +08:00
..
filebuffer
error.go
file_unix_test.go
file_unix.go
file_windows.go
io.go
keypair_test.go Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
keypair.go
legacy_test.go
legacy.go
pack_test.go
pack.go
paginate_test.go
paginate.go
path_test.go Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
path.go Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
remove.go
sanitize_test.go
sanitize.go
sec_to_time_test.go
sec_to_time.go
shellquote_test.go
shellquote.go
slice_test.go
slice.go
string_test.go
string.go
timer_test.go Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
timer.go Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
truncate_test.go Introduce GiteaLocaleNumber custom element to handle number localization on pages. (#23861) 2023-04-03 12:58:09 -04:00
truncate.go Introduce GiteaLocaleNumber custom element to handle number localization on pages. (#23861) 2023-04-03 12:58:09 -04:00
url.go
util_test.go Introduce GiteaLocaleNumber custom element to handle number localization on pages. (#23861) 2023-04-03 12:58:09 -04:00
util.go Merge template functions "dict/Dict/mergeinto" (#23932) 2023-04-07 09:39:08 -05:00