This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bytes | |
import ( | |
"encoding/binary" | |
"io" | |
) | |
// ErrBufferOverflow is triggered when the buffer overflows. | |
var ( | |
ErrBufferOverflow = errors.New("buffer overflow") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
TEMP_DIR="" | |
install_grip() { | |
local PLATFORM=$1 | |
local ARCH=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script build docker images and create docker tags using git tags with Semantic Versioning pattern | |
# https://semver.org/spec/v2.0.0.html | |
# However, it only partially supports pre-release tags as mentioned in part 9 (https://semver.org/spec/v2.0.0.html#spec-item-9) | |
# Supported git tags: v1.0.0, v1.0.0-beta.1, v1.0.0-alpha.1 | |
# Array of repos for the docker image | |
REPOS=("<REPO_URL_1>" "<REPO_URL_2>") | |
SEMANTIC_VERSION_PATTERN="^v([0-9]+)\.([0-9]+)\.([0-9]+)(-([A-Za-z-]+(\.[0-9A-Za-z-]+)?))?$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -E -o pipefail | |
sudo apt-get update -y | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ | |
gnupg | |
sudo mkdir -m 0755 -p /etc/apt/keyrings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# shellcheck disable=SC2016 | |
function install_go_tools { | |
if go version >/dev/null 2>&1 && curl -fLo "/tmp/go-tools.go" https://gist.githubusercontent.com/alexjoedt/9c61f9cc4ce211430257b2febd68be9f/raw/f45048da7b29d9037579bbf726db1ff39cfaeef3/tools.go; then | |
go run "/tmp/go-tools.go" | |
fi | |
} | |
function install_go { |