Literals in Regular Expression

Literals are the simplest form of pattern matching in regular expressions. They will simply succeed whenever that literal is found. func Match ¶ func Match(pattern string, b []byte) (matched bool, err error) Match reports whether the byte slice b contains any match of the regular expression pattern. Example Code Go Playground https://play.golang.org/p/ts3SyaxKQgF Resources go doc regexp/syntax https://pkg.go.dev/regexp?tab=doc#pkg-overview

Go Built-in Unit Testing

Naming conventions ( prefix with underscore) suffix with underscore with the filename. For example, the hello.go is the source file then hello.go with test package will have the filename hello_test.go tells the go test command that this file contains test functions. hello_test.go Testing package Importing the testing package is a must to be included along with other imported… Continue reading Go Built-in Unit Testing

Published
Categorized as Go, Testing

Creating a github.io personal website inside a GitHub repository

From https://guides.github.com/features/pages/ GitHub Pages are public webpages hosted and easily published through GitHub. The quickest way to get up and running is by using the Jekyll Theme Chooser to load a pre-made theme. You can then modify your GitHub Pages’ content and style remotely via the web or locally on your computer. Create Your Website Once… Continue reading Creating a github.io personal website inside a GitHub repository

Published
Categorized as Git

Connecting to GitHub with SSH

You can connect to GitHub using SSH. About SSH→ Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username or password at each visit. Checking for existing SSH keys→ Before you generate an SSH key, you can check to… Continue reading Connecting to GitHub with SSH

Published
Categorized as Git