Posts

Showing posts with the label Go

Building an iOS App with Go for CRUD Operations

Image
Here’s a complete end-to-end example of a CRUD app using Go for the backend and Swift for the iOS frontend . The app will manage a simple list of tasks. 1. Backend: Go Setup Install Go: https://go.dev/ Install dependencies: Use the Gin framework for HTTP and GORM for database interactions. Install via: go get - u github. com /gin-gonic/gin go get - u gorm.io/gorm go get - u gorm.io/driver/sqlite Code: main.go Here’s the complete code for a simple CRUD API: package main import ( "net/http" "github.com/gin-gonic/gin" "gorm.io/driver/sqlite" "gorm.io/gorm" ) type Task struct { ID uint `json: "id" gorm: "primaryKey" ` Title string `json: "title" ` Description string `json: "description" ` } var db *gorm. DB func main () { // Initialize database var err error db, err = gorm. Open (sqlite. Open ( "tasks.db" ), &gorm. Config {}) ...

Go Lang + Angular + Mysql CRUD example - Go Full stack development

Image
Hello everyone, today we will learn how to develop a full-stack web application that is a basic  User Management Application  using Angular, Go, and Mysql. GitHub repository link is provided at the end of this tutorial. You can download the source code. After completing this tutorial what we will build? We will build a full-stack web application that is a basic User Management Application with CRUD features:  • Create User • List All Users  • Update User  • Delete User  • View User  We divided this tutorial into two parts  PART 1 - Rest APIs Development using Go and Mysql  PART 2 - UI development using Angular PART 1 - Rest APIs Development using Go Language These are APIs that the Go Language application will export: GET all User's        :     /users  GET User by ID     :     /users/{_id}  POST User             :     ...