added binary struct.
This commit is contained in:
		
							
								
								
									
										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) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user