Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

Golang

How to use Go language (string, byte, rune)

You will always find string, byte, and rune in introductory Go language books. However, when you start to program, the frequent interconversions between each of them can be confusing. In such cases, we tend to somehow convert the type and …

I thought the Generics of the Go language was not relevant to me, but it was essential.

Generics has been included since version 1.18 of the Go language. To the extent that I use the Go language, I thought I would never use Generics because I don't write generic functions and the function descriptions are long. Useful feature…

Thoughts on switching from JavaScript to the Go language

Programs written in JavaScript (TypeScript) were rewritten in the Go language. I will write about the motivation and the results of the rewrite. Also, since this was my first time using the Go language, I will also write about what the Go …

Using GCP to monitor goroutine leaks in the Go language as effortlessly as possible

Goroutine Leak The Go language is a fascinating language because it is so easy to create goroutines (like threads). However, since the goroutine is executed separately from the main flow, it was unnoticed when the goroutine process stopped…

The book "Concurrency with the Go Language" made asynchronous processing fun.

I started with the Go language. When I learn something new, I like to read a book that gives me a one-stop, systematic overview. I read "Concurrency with Go Language" this time, and it was so good that I wrote my impressions here. Concurre…

Memo for using "time", the Go language's time calculation package

The Go language is often programmed by combining simple functions, and error checking occurs for each function, so the code in general tends to be long. Even when I want to do something small, I need to write code accordingly, but it is te…

Go Language Regular Expression and String Manipulation Memo

The Go language is often programmed by combining simple functions, and error checking occurs for each function, so the code in general tends to be long. Even when I want to do something small, I need to write code accordingly, but it is te…

Memo on how to read/write JSON in Go language

The Go language is often programmed by combining simple functions, and error checking occurs for each function, so the code in general tends to be long. Even when I want to do something small, I need to write code accordingly, but it is te…

Notes on how to read and write using file, IO, and stream in Go language

The Go language is often programmed by combining simple functions, and error checking occurs for each function, so the code in general tends to be long. Even when I want to do something small, I need to write code accordingly, but it is te…

How to use local packages in Go language (Go Moludes)

I was writing a program in Golang and the program was getting long, so I decided to break it up into packages. configuration The directory structure is as follows. . |-- a | `-- a.go |-- b | `-- b.go `-- main.go procedure Square Needle Use…

Notes on what I got into with Go language (interface)

I started Golang. Golang, like C, has a simple syntax and data structure, but it also incorporates advanced concepts to increase productivity. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, I ma…

Notes on things I got stuck on in Go language (value passing and pointer passing)

I started Golang. Golang uses pointers. Since Golang is historically a new language, I thought that I could just write code without being aware of pointers and it would work fine, but I was naive... The pointer itself is common, and if you…

Notes on things I got stuck on in Go language (slice, map, string)

I started Golang. Golang, like C, has a simple syntax and data structure, but it also incorporates advanced concepts to increase productivity. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, I ma…

A note on something I got stuck on in Go language (putting a struct in a map causes a "cannot assign to struct field ..." error). error when you put a struct in the map)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …

Notes on things I got stuck on in Go language (classes and inheritance)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …

Note on things I got stuck on in Go language (no arrow operator in pointer)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …