Cloud-oriented Life

Cloud Native Technology Improves Lives

//go:embed

Go 1.16 introduced a new //go:embed directive that allows you to include the contents of arbitrary files and directories in your Go application.

The basic idea of embedding is that by adding a special comment to your code, Go will know to include a file or files. The comment should look like //go:embed FILENAME(S) and be followed by a variable of the type you want to embed: string or []byte for an individual file or embed.FS for a group of files.

The go:embed directive understands Go file globs, so patterns like files/.html will also work (but not **/.html recursive globbing).

You can read the official docs embed · pkg.go.dev - https://pkg.go.dev/embed for a complete technical explanation, so here let’s take a look at some examples to see what’s possible.

Read more »

GitHub action

Each time you push the code or create a new release on GitHub, you can trigger a workflow to publish your image. The workflow in the example below runs when the push event triggers.

In the example workflow below, we use the Docker build-push-action action to build the Docker image and, if the build succeeds, push the built image to Docker Hub.

Read more »

Querydsl JPA CRUD Usages

Querydsl defines a general statically typed syntax for querying on top of persisted domain model data. JDO and JPA are the primary integration technologies for Querydsl. This guide describes how to use Querydsl in combination with JPA.

Read more »

dry-configurable

dry-configurable is a simple mixin to add thread-safe configuration behaviour to your classes. There are many libraries that make use of configuration, and each seemed to have their own implementation with a similar or duplicate interface, so we thought it was strange that this behaviour had not already been encapsulated into a reusable gem, hence dry-configurable was born.

Read more »

miniprogram-automator

miniprogram-automator is the Miniprogram Automation SDK provides developers with a set of solutions for manipulating Miniprograms through external scripts and Wechat Devtools so as to achieve the purpose of Miniprogram automation testing.

Read more »

HP Easy Start

HP Easy Start is the new way to set up your HP printer and prepare your Mac for printing. HP Easy Start will locate and install the latest software for your printer and then guide you through printer setup.

HP Easy Start is a unique and useful application designed to guide you setting up with the most updated drivers for your HP Printer . These drivers address printer to computer compatibility, but also makes it easy to set up your devices ready for printing.

Read more »
0%