Skip to content

Commit

Permalink
Revert "forbid building with go1.20 or newer"
Browse files Browse the repository at this point in the history
This reverts commit 50cd051.
  • Loading branch information
hadv committed Mar 14, 2023
1 parent cb9dcd7 commit 58accb3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmd/opera/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,11 @@ package main
import (
"fmt"
"os"
"runtime"

"github.com/Fantom-foundation/go-opera/cmd/opera/launcher"
)

func main() {
// TODO erase after compatibility issues with go1.20 are fixed
var majorVer int
var minorVer int
var other string
n, err := fmt.Sscanf(runtime.Version(), "go%d.%d%s", &majorVer, &minorVer, &other)
if n >= 2 && err == nil {
if (majorVer*100 + minorVer) > 119 {
panic(runtime.Version() + " is not supported, please downgrade your go compiler to go 1.19 or older")
}
}
if err := launcher.Launch(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
Expand Down

0 comments on commit 58accb3

Please sign in to comment.