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 main | |
import ( | |
"fmt" | |
"github.com/nicksnyder/go-i18n/v2/i18n" | |
"golang.org/x/text/language" | |
"strings" | |
) | |
func main() { |
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
# MI (modules image) is for getting dependencies. | |
# MI will be cached till the dependency changing. | |
# It is useful trick to speed up the process of building | |
FROM golang:1.13 as MI | |
ADD go.mod go.sum /m/ | |
RUN cd /m && go mod download | |
# BI (build image) is for building App | |
FROM golang:1.13 as BI |
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
// License: MIT Open Source | |
// Copyright (c) Joe Linoff 2016 | |
// Go code to prompt for password using only standard packages by utilizing syscall.ForkExec() and syscall.Wait4(). | |
// Correctly resets terminal echo after ^C interrupts. | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" |
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
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
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 main | |
import ( | |
"fmt" | |
"math/rand" | |
"sort" | |
"time" | |
) | |
func main() { |