added binary struct.
This commit is contained in:
parent
ecb0220080
commit
a4bc77120d
15
other.go
15
other.go
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user