You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/07/23 18:45:55 UTC

[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #6006: Fix CLI flags being ignored in traffic_vault_migrate

mattjackson220 commented on a change in pull request #6006:
URL: https://github.com/apache/trafficcontrol/pull/6006#discussion_r675759084



##########
File path: traffic_ops/app/db/traffic_vault_migrate/traffic_vault_migrate.go
##########
@@ -61,29 +61,17 @@ var (
 )
 
 func init() {
-	fromTypePtr := getopt.StringLong("fromType", 't', riakBE.Name(), fmt.Sprintf("From server types (%v)", strings.Join(supportedTypes(), "|")))
-	if fromTypePtr == nil {
-		stdlog.Fatal("unable to load fromType")
-	}
-	fromType = *fromTypePtr
+	fromType = riakBE.Name()
+	getopt.FlagLong(&fromType, "fromType", 't', fmt.Sprintf("From server types (%v)", strings.Join(supportedTypes(), "|")))
 
-	toTypePtr := getopt.StringLong("toType", 'o', pgBE.Name(), fmt.Sprintf("From server types (%v)", strings.Join(supportedTypes(), "|")))
-	if toTypePtr == nil {
-		stdlog.Fatal("unable to load toType")
-	}
-	toType = *toTypePtr
+	toType = pgBE.Name()
+	getopt.FlagLong(&fromType, "toType", 'o', fmt.Sprintf("From server types (%v)", strings.Join(supportedTypes(), "|")))

Review comment:
       should be `&toType` and `To server types`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org