added binary struct.

This commit is contained in:
5elenay 2021-08-30 10:51:30 +03:00
parent ecb0220080
commit a4bc77120d

View File

@ -1,6 +1,9 @@
package revoltgo
import "fmt"
import (
"fmt"
"os"
)
// Similar to message, but created for send message function.
type SendMessage struct {
@ -266,3 +269,13 @@ func (eu *EditUser) SetRemove(item string) *EditUser {
eu.Remove = item
return eu
}
// Revoltgo binary struct.
type Binary struct {
Data []byte
}
// Save data to the given path.
func (b Binary) Save(path string) error {
return os.WriteFile(path, b.Data, 0666)
}