.idea | ||
.gitignore | ||
error.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
README.md | ||
test.txt |
checkdigitCalculator
This is a calculator written in Go to process a text file of a large list of UPCs calculating their Check Digits.
Instructions
Windows
Create Directory and "Install" Program
- Create a directory, that you will remember and is easy to to type, to copy the binary (checkdigitcalc.exe) into.
- Copy the binary into that directory.
Prepare Text File
- Open a Text Editor and Paste UPCs (taking care to remove any Alphabet characters).
- Save the file with any name you want ending in .txt or .csv in the directory where you put the program. (i.e. upcs.txt)
Run the Program
- Copy the location of the directory from File Explorer
- Open cmd.exe or PowerShell
- type "cd " (don't forget the space) and press Shift+Insert (or Right Click) and press Enter.
- Back in the command line program type checkdigitcalc.exe (I like to type check and then press tab).
- (optional) Along with typing the command in step the previous step, you can type the file you want to process as an argument (next to command). An advantage of this method is typing the first character or two of the file name and pressing tab. (i.e. "checkdigitcalc.exe upcs.txt")
- (optional) If you do not type a filename when entering the command, the program will ask for the name of the file. Type the name of the text file you created including the extension (.txt or .csv) (i.e. upcs.txt)
- When the program finishes, it will exit. Open the answer.txt file that was produced/rewritten by the program.