From f740223d88f4ec1951bc4fc93ad72585bc09486e Mon Sep 17 00:00:00 2001 From: filifa Date: Wed, 27 Aug 2025 22:42:45 -0400 Subject: [PATCH] name variables more clearly --- cmd/jacobi.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/jacobi.go b/cmd/jacobi.go index 8167bb9..9f6e964 100644 --- a/cmd/jacobi.go +++ b/cmd/jacobi.go @@ -23,18 +23,18 @@ import ( "github.com/spf13/cobra" ) -var a string -var n string +var jacobiTop string +var jacobiBottom string func jacobi(cmd *cobra.Command, args []string) { - x, ok := new(big.Int).SetString(a, 10) + x, ok := new(big.Int).SetString(jacobiTop, 10) if !ok { - cobra.CheckErr("invalid input " + a) + cobra.CheckErr("invalid input " + jacobiTop) } - y, ok := new(big.Int).SetString(n, 10) + y, ok := new(big.Int).SetString(jacobiBottom, 10) if !ok { - cobra.CheckErr("invalid input " + n) + cobra.CheckErr("invalid input " + jacobiBottom) } mod := big.NewInt(2) @@ -68,8 +68,8 @@ func init() { // is called directly, e.g.: // jacobiCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") - jacobiCmd.Flags().StringVarP(&a, "residue", "a", "", "residue") + jacobiCmd.Flags().StringVarP(&jacobiTop, "residue", "a", "", "residue") jacobiCmd.MarkFlagRequired("residue") - jacobiCmd.Flags().StringVarP(&n, "modulus", "n", "", "modulus") + jacobiCmd.Flags().StringVarP(&jacobiBottom, "modulus", "n", "", "modulus") jacobiCmd.MarkFlagRequired("modulus") }