![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/krishbhanushali/go-rest-unit-testing
Clone the application with git@github.com:krishsb2405/assignment.git
Use the mySQL dump sql-dump.sql
to create the database, create the tables and insert some dump data.
Once the application is cloned and database is created, change the Connection String as per your mysql username, password and database name on line No. 20 in api.go.
Download the postman configuration file (optional).
There are number of dependencies which need to be imported before running the application. Please get the dependenices through the following commands -
go get "github.com/go-sql-driver/mysql"
go get "github.com/gorilla/mux"
To run the application, please use the following command -
go run api.go entry.go
Note: By default the port number its being run on is 12345.
URL - *http://localhost:12345/api/entries*
Method - GET
URL - *http://localhost:12345/api/entry?id=1*
Method - GET
URL - *http://localhost:12345/api/entry*
Method - POST
Body - (content-type = application/json)
{
"first_name":"John",
"last_name":"Doe",
"email_address":"john.doe@gmail.com",
"phone_number":"1234567890"
}
URL - *http://localhost:12345/api/entry*
Method - PUT
Body - (content-type = application/json)
{
"id":5,
"first_name":"John",
"last_name":"Doe",
"email_address":"john.doe@gmail.com"
}
URL - *http://localhost:12345/api/entry?id=1*
Method - DELETE
URL - *http://localhost:12345/api/upload-entries-CSV*
Method - POST
Body - form-data
{
"csvFile": <csv-file>
}
URL - *http://localhost:12345/api/download-entries-CSV*
Method - GET
To run all the unit test cases, please do the following -
go run api.go entry.go
go test -v
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.