package
0.0.0-20241014073836-494392fdef12
Repository: https://github.com/hajimeo/samples.git
Documentation: pkg.go.dev

# README

To compile, using below bash function:

function goBuild() {
    local _goFile="$1"
    local _name="$2"
    local _destDir="${3:-"$HOME/IdeaProjects/samples/misc"}"
    [ -z "${_name}" ] && _name="$(basename "${_goFile}" ".go" | tr '[:upper:]' '[:lower:]')"
    if [ -d /opt/homebrew/opt/go/libexec ]; then
        export GOROOT=/opt/homebrew/opt/go/libexec
    fi
    env GOOS=linux GOARCH=amd64 go build -o "${_destDir%/}/${_name}_Linux_x86_64" ${_goFile} && \
    env GOOS=linux GOARCH=arm64 go build -o "${_destDir%/}/${_name}_Linux_aarch64" ${_goFile} && \
    env GOOS=darwin GOARCH=amd64 go build -o "${_destDir%/}/${_name}_Darwin_x86_64" ${_goFile} && \
    env GOOS=darwin GOARCH=arm64 go build -o "${_destDir%/}/${_name}_Darwin_arm64" ${_goFile} || return $?
    env GOOS=windows GOARCH=amd64 go build -o "${_destDir%/}/${_name}_Windows_x86_64" ${_goFile}
    ls -l ${_destDir%/}/${_name}_* || return $?
    echo "curl -o /usr/local/bin/${_name} -L \"https://github.com/hajimeo/samples/raw/master/misc/${_name}_\$(uname)_\$(uname -m)\""
    date
}

When a Golang module uses "helpers", may want to use one of the following commands:

go get github.com/hajimeo/samples/golang/helpers@latest
go mod edit -replace github.com/hajimeo/samples/golang/helpers=$HOME/IdeaProjects/samples/golang/helpers

and maybe go mod tidy, go list -m -u all && go get -u all.

# Packages

* * Based on https://gist.github.com/JalfResi/6287706 * https://qiita.com/convto/items/64e8f090198a4cf7a4fc (japanese) * go build -o ../../misc/reverseproxy_$(uname) reverseProxy.go && env GOOS=linux GOARCH=amd64 go build -o ../../misc/reverseproxy_Linux reverseProxy.go && env GOOS=linux GOARCH=arm64 go build -o ../../misc/reverseproxy_LinuxArm reverseProxy.go */.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author