Browse Source

Remove hardcoded binary name from unstuff routine

Kailash Nadh 6 năm trước cách đây
mục cha
commit
65317503cf
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -89,7 +89,7 @@ func initConfig(ko *koanf.Koanf) error {
 // initFileSystem initializes the stuffbin FileSystem to provide
 // access to bunded static assets to the app.
 func initFileSystem(binPath string) (stuffbin.FileSystem, error) {
-	fs, err := stuffbin.UnStuff("./listmonk")
+	fs, err := stuffbin.UnStuff(os.Args[0])
 	if err == nil {
 		return fs, nil
 	}