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 (
|
||||
"bufio"
|
||||
"embed"
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
|
@ -19,7 +19,9 @@ var i_was_IPv6 = false
|
|||
var i_was_ported = false
|
||||
var i_last_method string
|
||||
var i_methods []string
|
||||
var methods_file = "methods.txt"
|
||||
|
||||
//go:embed methods.txt
|
||||
var i_methods_file embed.FS
|
||||
|
||||
// === timings ===
|
||||
|
||||
|
@ -43,7 +45,7 @@ var port_chance = 0.05
|
|||
func main() {
|
||||
|
||||
// read the methods file!
|
||||
content, err := os.Open(methods_file)
|
||||
content, err := i_methods_file.Open("methods.txt")
|
||||
if err != nil {
|
||||
// fuck!!!
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue