Commits

juster  committed dc2debc

Change constants to be a specific type.

  • Participants
  • Parent commits df1a1d1

Comments (0)

Files changed (1)

 	"exec"
 )
 
+type CmdOpt int
+
 const (
 	MAW_USERAGENT = "maw/1.0"
 	MAW_ENVVAR    = " MAWSECRET " // spaces are there so PKGBUILDs can't use it [easily]
-	OptQuery      = iota
-	OptRemove     = iota
-	OptSync       = iota
-	OptDepTest    = iota
-	OptHelp       = iota
+	OptQuery      CmdOpt          = iota
+	OptRemove
+	OptSync
+	OptDepTest
+	OptHelp
 )
 
 type MawOpt struct {
-	Action  int
+	Action  CmdOpt
 	AsDeps  bool
 	Targets []string
 }
 		return &MawOpt{Action: OptHelp}
 	}
 
-	var act int
+	var act CmdOpt
 	var asdeps bool
 
 	switch cmdopts[0] {