all: Go 1.21 support

This commit is contained in:
Ayke van Laethem
2023-07-06 12:01:52 +02:00
committed by Ron Evans
parent c25dd0a972
commit a93f0ed12a
16 changed files with 76 additions and 20 deletions
+5 -1
View File
@@ -284,7 +284,7 @@
return 0;
},
},
env: {
gojs: {
// func ticks() float64
"runtime.ticks": () => {
return timeOrigin + performance.now();
@@ -444,6 +444,10 @@
},
}
};
// Go 1.20 uses 'env'. Go 1.21 uses 'gojs'.
// For compatibility, we use both as long as Go 1.20 is supported.
this.importObject.env = this.importObject.gojs;
}
async run(instance) {