fixed post-build issue where methods file isn't embedded. thanks go embed
This commit is contained in:
parent
641ef2d77e
commit
cc953a24cc
2 changed files with 5 additions and 3 deletions
|
@ -2,10 +2,10 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -19,7 +19,9 @@ var i_was_IPv6 = false
|
||||||
var i_was_ported = false
|
var i_was_ported = false
|
||||||
var i_last_method string
|
var i_last_method string
|
||||||
var i_methods []string
|
var i_methods []string
|
||||||
var methods_file = "methods.txt"
|
|
||||||
|
//go:embed methods.txt
|
||||||
|
var i_methods_file embed.FS
|
||||||
|
|
||||||
// === timings ===
|
// === timings ===
|
||||||
|
|
||||||
|
@ -43,7 +45,7 @@ var port_chance = 0.05
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// read the methods file!
|
// read the methods file!
|
||||||
content, err := os.Open(methods_file)
|
content, err := i_methods_file.Open("methods.txt")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// fuck!!!
|
// fuck!!!
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue