src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

parameters.go (341B)


      1 package command
      2 
      3 import (
      4 	"fmt"
      5 	"time"
      6 
      7 	"code.dwrz.net/src/pkg/dqs/store"
      8 )
      9 
     10 type Parameters struct {
     11 	Args  []string
     12 	Date  time.Time
     13 	Store *store.Store
     14 }
     15 
     16 func (p *Parameters) Validate() error {
     17 	if p.Args == nil {
     18 		return fmt.Errorf("missing arguments")
     19 	}
     20 	if p.Store == nil {
     21 		return fmt.Errorf("missing store")
     22 	}
     23 
     24 	return nil
     25 }