Welcome to the Credit Card Validator project! This simple Go application allows you to validate credit card transactions against a specified limit. This project was originally created for the Turing School of Software and Design's Back End Engineering program in Ruby, but I have adapted the original project, while following all guidlines, to work in Go.
-
Confirm you have Go installed correctly on your local machine at this link:
-
Clone the repository:
git clone https://github.com/sambcox/go-credit-check.git
-
Navigate to the project directory:
cd go-credit-check
-
Run the application:
go run main.go
-
Confirm that all tests are passing:
go test ./...
-
Follow the prompts in the command line to input credit card details and transaction amount.
- main.go: Contains the main application logic for interacting with users and initiating credit card validations.
- creditCard/creditCard.go: Defines the CreditCard struct and related methods for creating, retrieving information, and validating credit cards.
- bank/bank.go: Implements the Bank struct and a method for validating transactions based on credit card limits and validity.