name variables more clearly

This commit is contained in:
filifa 2025-08-27 22:42:45 -04:00
parent 654f0efc0a
commit f740223d88
1 changed files with 8 additions and 8 deletions

View File

@ -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")
}