This project is a simple banking application built in Go. It demonstrates the use of Go's standard database/sql
package along with PostgreSQL for database interactions. The project structure includes a testing setup that leverages environment variables for database configuration.
To get started with the Simple Bank Project, follow these steps:
- Go (1.15 or later)
- PostgreSQL
- A
.env
file with your database configuration
- Clone the repository to your local machine:
git clone https://github.com/yourusername/simplebankproject.git
cd simplebankproject
-
Ensure PostgreSQL is running and create a database for the project.
-
Create a
.env
file in the root of the project with the following configuration:
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
DB_PORT=5432
DB_HOST=localhost
DB_SSLMODE=disable
- Install the project dependencies:
go mod tidy
Running Tests
go test -v ./...
this will run all the tests in the project
Contributions to the Simple Bank Project are welcome. Please ensure to follow the standard Go coding guidelines and add tests for new features.
This project is licensed under the MIT License. See the LICENSE file for more information.