This commit is contained in:
asteam committed 2025-09-23 14:34:24 +03:00
1 parent b924e85e49
commit f1ffb4c0fd
1108 files changed
+72020

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package serialization
import (
"os"
)
type Writable interface {
WriteToFile(string) error
}
type Serialized []byte
// WriteToFile writes serialized data to specified file.
//
// Make sure to use .json extension for best compatibility.
func (s Serialized) WriteToFile(path string) error {
return os.WriteFile(path, s, 0600)
}