This commit is contained in:
2026-06-19 17:37:20 +03:00
parent b897b3447a
commit f679261f74
1513 changed files with 107093 additions and 1 deletions

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)
}