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 | |
# If you using sh, please remove the `-o pipefail` | |
set -eufo pipefail | |
#set -x | |
check_in_container() { | |
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && [ -z ${KUBERNETES_SERVICE_HOST+x} ]; then | |
echo "[ERR] This script should be run inside a container environment!" | |
exit 1 |
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
type Calculator struct { | |
ui.Node | |
Display string | |
} | |
func NewCalculator() *Calculator { | |
c := &Calculator{} | |
c.Build(c) | |
return c | |
} |
OlderNewer