mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 14:14:02 +03:00
Add simple-run command
This commit is contained in:
+4
-1
@@ -58,7 +58,10 @@ func (s Secret) MarshalText() ([]byte, error) {
|
||||
|
||||
// UnmarshalText is to support text.Unmarshaller interface.
|
||||
func (s *Secret) UnmarshalText(data []byte) error {
|
||||
text := string(data)
|
||||
return s.Set(string(data))
|
||||
}
|
||||
|
||||
func (s *Secret) Set(text string) error {
|
||||
if text == "" {
|
||||
return ErrSecretEmpty
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user