Categories
Building CodeKN.com Golang Tutorials Videos

[Video] Go & GORM: Remove ID field and review gorm.Model usage

This short post is part of my coding session, where I review the usage of ID and KEY (UUID) fields for my research project. In particular, I will remove the ID fields’ usage and check if the system works as expected. How to remove the GORM ID field? Here is an example of Model transofrmation. […]

Categories
Building CodeKN.com Coding Session Golang Videos

Golang GORM: Set size for index columns, automate table alter scripts (Coding Session)

In this video session, I am working on CodeKN.com and, in particular, its URL Meta Parser worker. During the coding session, I will set the size for MySQL index fields using Golang GORM models, automate table alter execution for setting collation on the table level, and also debug the application to find errors with page […]

Categories
Building CodeKN.com Coding Session Golang Videos

[Video] Add new database tables using Golang and GORM (MySQL)

New Coding Session: Add new database tables using Golang and GORM:– Using Go and Gorm save links and image URLs from the website.– Introduce a unique index for a pair of fields (MySQL).– Error handler and logging.

Categories
Building CodeKN.com Golang Tutorials Videos

[Video] Golang: PubSub implementation using Go channels (Tutorial)

Golang: PubSub implementation using Go channels. Go PubSub implementation: Data-pipeline Read more about data-pipeline implementation used as an example: Used Resources https://eli.thegreenplace.net/2020/pubsub-using-channels-in-go/ https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern

Categories
Golang

Fixing “Goland: go build -i cause open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied”

Goland as well as Go’s build sometimes throws the following issue: go build -i cause open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied.

Categories
Golang

Golang: How to Serve favicon, sitemap.xml, and ads.txt?

In this short post, I want to provide ready-to-use code snippets for serving the favicon, sitemap.xml, and ads.txt files.

Categories
Beego Golang

Build an app with Go Beego: Controller & Router (Pt. 1)

In this coding session, we will use Golang’s Beego web framework to build an API / Web app from scratch: controller & routers.

Categories
Golang

Golang HTML Tokenizer: extract text from a web page

Using Golang HTML tokenizer allows us to parse a web page and distinguish elements like tags, text data, comment, and doctype. By using it, we can get only text information or just self-closing tags.

Categories
Golang Tools Vim

Go Debug VIM: Use VIM to debug Golang (demo video)

Debugging Go code from within VIM using the excellent vim-go plugin.