Have to create placeholder images in Go project?

Overview of the "Sticket" - a Golang library, that generate placehold images with text 
07 August 2017   1280
Go

Open source project developed by a team at Google and many contributors from the open source community.

All web developers one way or another have to deal with the layout. The task is to harmoniously arrange the content on the page (text, images, video, etc.), make it flexible, responsive, beautiful and appropriate design idea.

Placeholder images help all web developers to make their products pretty and suitable for any screensize. Let's learn how to generate placeholder images in Go project easily.

Sticker is a Go library, that  generate placeholder images with text.

Installation

Make sure you have a working Go environment.

To install sticker, simply run:

go get github.com/muesli/sticker

To execute it from source:

cd $GOPATH/src/github.com/muesli/sticker
go get -u -v
go build && go test -v

Example

gen, err := sticker.NewImageGenerator(sticker.Options{
    TTFPath:         "/usr/share/fonts/TTF/Roboto-Bold.ttf",
    MarginRatio:     0.2,
    Foreground:      color.RGBA{0x96, 0x96, 0x96, 0xff},
    Background:      color.RGBA{0xcc, 0xcc, 0xcc, 0xff},
    BackgroundImage: img,
})
img, err := gen.NewPlaceholder("Lorem ipsum!", 400, 200)
...
 

Sticker will automatically pick a suitable font size, so the text will always fit neatly inside the image.

If you supply a background image, it will automatically be cropped and scaled (while maintaining its original aspect ratio) to the desired output size.

Learn more and download Sticker from GitHub.

ClusterFuzz to be Open Source Now

Program's code is written in Python and Go, and distributed under the Apache 2.0 license
08 February 2019   445

Google has opened the source code for the ClusterFuzz platform, intended for fuzzing code testing using a server cluster. In addition to coordinating the execution of checks, ClusterFuzz also automates the execution of tasks such as sending a notification to developers, creating an application for a patch (issue), tracking a bug fix, and closing reports after a patch. The code is written in Python and Go, and distributed under the Apache 2.0 license. ClusterFuzz instances can run on Linux, macOS and Windows systems, as well as in various cloud environments.

Since 2011, ClusterFuzz has been used in the depths of Google to detect errors in the Chrome codebase and to ensure the operation of the OSS-Fuzz project, in the framework of which continuous fuzzing testing of open source software was organized. In total, ClusterFuzz has revealed more than 16 thousand errors in Chrome and more than 11 thousand errors in 160 open source projects participating in the OSS-Fuzz program. Due to the continuous process of checking the current code base, errors are usually caught within a few parts after the code is introduced and the changes causing them.