Revert "Updating file path location search for config.json"

This reverts commit c5a2d036d7.

This commit was reverted since it breaks 'go run *.go', I plan on
bringing back custom config.json location with a switch instead.
This commit is contained in:
Sean DuBois 2014-07-04 13:22:48 +00:00
parent be624ce771
commit 598eea73e3
1 changed files with 1 additions and 6 deletions

View File

@ -3,7 +3,6 @@ package main
import (
"encoding/json"
"fmt"
"path"
"github.com/Sean-Der/fail2go"
"github.com/gorilla/mux"
"net/http"
@ -22,11 +21,7 @@ type ErrorBody struct {
var fail2goConn *fail2go.Conn
func main() {
//Changing path of current running directory to path of running executable for finding the config.json file.
//This will allow the creation of a linux service to run fail2rest (ie: service fail2rest start/stop/status)
var filePath string = path.Dir(os.Args[0])
file, fileErr := os.Open(filePath + "/config.json")
file, fileErr := os.Open("config.json")
if fileErr != nil {
fmt.Println("failed to open config:", fileErr)