Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DevOps Golang tools

License

NotificationsYou must be signed in to change notification settings

HariSekhon/DevOps-Golang-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub starsGitHub forksLineCountCocomoLicenseMy LinkedInGitHub Last Commit

CodacyCodeFactorLanguage grade: GolangQuality Gate StatusMaintainability RatingReliability RatingSecurity RatingVulnerabilitiesTotal alerts

LinuxMacDockerDockerfileDockerHub Pulls

CI Builds OverviewJenkinsConcourseGoCDTeamCity

CircleCIBuildKiteAppVeyorDroneCodefreshCirrus CISemaphoreBuddyShippableTravis CI

Azure DevOps PipelineGitLab PipelineBitBucket PipelineAWS CodeBuildGCP Cloud Build

Repo on GitHubRepo on GitLabRepo on Azure DevOpsRepo on BitBucketShellCheckJSONYAMLXMLMarkdownValidationKicsGrypeSemgrepSemgrep CloudTrivy

GitHub Actions UbuntuMacMac 11Mac 12UbuntuUbuntu 20.04Ubuntu 22.04DebianDebian 10Debian 11Debian 12CentOSCentOS 7CentOS 8FedoraAlpineAlpine 3

Golang versionsGolangGolang 1.9Golang 1.10Golang 1.11Golang 1.12Golang 1.13Golang 1.14Golang 1.15Golang 1.16Golang 1.17Golang 1.18

git.io/go-tools

DevOps Golang Tools

All programs have--help to list the available options.

Hari Sekhon

Cloud & Big Data Contractor, United Kingdom

https://www.linkedin.com/in/HariSekhon
(you're welcome to connect with me on LinkedIn)

Make sure you runmake update if updating and not justgit pull as you will often need the latest library submodule and possibly new upstream libraries

Quick Start

Ready to run Docker image

All programs and their pre-compiled dependencies can be found ready to run onDockerHub.

List all programs:

docker run harisekhon/go-tools

Run any given program:

docker run harisekhon/go-tools<program><args>

Automated Build from source

installs git, make, pulls the repo and build the binaries:

curl -L https://git.io/go-bootstrap| sh

or manually:

git clone https://github.com/HariSekhon/DevOps-Golang-tools go-toolscd go-toolsmake

Themake command automates building the go binaries which can then be copied around to other systems of the samefamily, eg. Linux or Mac.

Alternatively there is shebang magic which means each.go program can be called directly like a script and it'llruntime compile and execute instantly like a scripted language. This is a neat trick for quick usage and testing builtongo run, but for frequent use the compiled binaries are usually the way to go.

Detailed Build Instructions are available further down.

Usage

All programs come with a--help switch which includes a program description and the list of command line options.

Environment variables are supported for convenience and also to hide credentials from being exposed in the process listeg.$PASSWORD,$TRAVIS_TOKEN. These are indicated in the--help descriptions in brackets next to each option andoften have more specific overrides with higher precedence eg.$AMBARI_HOST,$HBASE_HOST take priority over$HOST.

DevOps Golang Tools - Inventory

  • Linux:
    • uniq2.go - likeuniq but you don't have to sort first and it preserves the ordering
    • diffnet.go - simplifies diff output to show only lines added/removed, not moved, from patch files or stdin(pipe from standarddiff orgit diff commands)
    • httpfirst.go - returns the first http/https url address argument to respond (fastest multi-threaded reply usinggo channels). More sophisticated version isfind_active_server.py in theDevOps Python tools repo which canhandle multi-master clusters, tcp sockets, regex etc.
    • pldd.go - parses/proc on Linux to show the runtime.so loaded dynamic shared libraries a program pid isusing. Runtime equivalent of the classic staticldd command and because the systempldd command often fails toattach to a process
    • colors.go - prints a table of terminal colors and their escape codes for doing fancy shell stuff
    • welcome.go - cool spinning welcome message greeting your username and showing last login time and user to put inyour shell's.profile (there are also Python and Perl versions in myDevOps Python Tools andDevOps Perl Tools repos)

Detailed Build Instructions

Manual Setup

Enter the go-tools directory and run git submodule init and git submodule update to fetch my library repo:

git clone https://github.com/HariSekhon/DevOps-Golang-tools go-toolscd go-toolsgit submodule update --init./compile.sh
Mac OS X

The automated build also works on Mac OS X but you'll need to installApple XCode (on recent Macs just typinggit is enough to trigger Xcode install).

I also recommend you getHomeBrew to install other useful tools and libraries you may need like OpenSSL fordevelopment headers and tools such as wget (these are installed automatically if Homebrew is detected on Mac OS X):

bash-tools/install/install_homebrew.sh

Updating

Runmake update. This will git pull and then git submodule update which is necessary to pick up corresponding libraryupdates.

Contributions

Patches, improvements and even general feedback are welcome in the form of GitHub pull requests and issue tickets.

Star History

Star History Chart

git.io/go-tools

More Core Repos

Knowledge

Readme CardReadme Card

DevOps Code

Readme CardReadme CardReadme CardReadme Card

Containerization

Readme CardReadme Card

CI/CD

Readme CardReadme Card

DBA - SQL

Readme Card

DevOps Reloaded

Readme CardReadme CardReadme CardReadme CardReadme Card

Templates

Readme CardReadme Card

Misc

Readme CardReadme Card

The rest of my original source repos arehere.

Pre-built Docker images are available on myDockerHub.


[8]ページ先頭

©2009-2025 Movatter.jp