use init func not main func
Signed-off-by: Margo Crawford <margaretc@vmware.com>
This commit is contained in:
parent
643851291a
commit
1ee0aed054
@ -5,4 +5,13 @@ package main
|
||||
|
||||
import (
|
||||
_ "crypto/tls/fipsonly" // restricts all TLS configuration to FIPS-approved settings.
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
||||
func init() {
|
||||
go func() {
|
||||
time.Sleep(5 * time.Second)
|
||||
log.Println("using boringcrypto in fipsonly mode")
|
||||
}()
|
||||
}
|
||||
|
@ -5,9 +5,13 @@ package ptls
|
||||
|
||||
import (
|
||||
_ "crypto/tls/fipsonly" // restricts all TLS configuration to FIPS-approved settings.
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("using fips only mode.")
|
||||
func init() {
|
||||
go func() {
|
||||
time.Sleep(5 * time.Second)
|
||||
log.Println("using boringcrypto in fips only mode.")
|
||||
}()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user