mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-11 03:06:51 +02:00
improved homepage support, memory leak partial fix
This commit is contained in:
@@ -110,6 +110,10 @@ func Copy(dst *ContextWriter, src *ContextReader) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func Copy2(ctx context.Context, dst io.Writer, src io.Reader) error {
|
||||
return Copy(&ContextWriter{ctx: ctx, Writer: dst}, &ContextReader{ctx: ctx, Reader: src})
|
||||
}
|
||||
|
||||
func LoadJson[T any](path string, pointer *T) E.NestedError {
|
||||
data, err := E.Check(os.ReadFile(path))
|
||||
if err.HasError() {
|
||||
|
||||
Reference in New Issue
Block a user