This file contains hidden or 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 ( | |
| "crypto/sha256" | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { | |
| fmt.Println(sha256sum(16888)) // dfaf07638f5e92673ef23f8c8878afe8f3580d0fde7fb54b23e841626c3bedbc | 
  
    
      This file contains hidden or 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" | |
| "sort" | |
| "github.com/Masterminds/semver/v3" | |
| ) | |
| type Language struct { | 
  
    
      This file contains hidden or 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" | |
| "sync" | |
| ) | |
| func main() { | |
| printNumbersInKGoroutinesForNTimes(3, 10) // 123123123123123123123123123123 | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # 生成私钥 | |
| $ openssl genrsa -out ssl.key 2048 | |
| # 对私钥进行加密 | |
| $ openssl rsa -in ssl.key -des3 -out encrypted.key | |
| # 私钥生成证书请求(根据需求选择加密私钥或者非加密私钥) | |
| $ openssl req -new -key ssl.key -out ssl.csr -sha256 | |
| # 用 ca 证书给证书请求签证 | |
| $ openssl x509 -req -in ssl.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out ssl.crt -days 365 -sha256 | 
  
    
      This file contains hidden or 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 ( | |
| "bytes" | |
| "context" | |
| "os" | |
| corev1 "k8s.io/api/core/v1" | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| "k8s.io/cli-runtime/pkg/genericclioptions" | 
  
    
      This file contains hidden or 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" | |
| func main() { | |
| v := []int{1,2,3} | |
| for i := range v { | |
| v = append(v, i) | |
| } | |
| fmt.Println(v) | 
  
    
      This file contains hidden or 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" | |
| func main() { | |
| fmt.Println("hello world") | |
| } |