Add simple-run command

This commit is contained in:
9seconds
2021-07-30 16:15:36 +03:00
parent c53364d952
commit c85c88efd6
6 changed files with 107 additions and 19 deletions
+4 -1
View File
@@ -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
}