summaryrefslogtreecommitdiff
path: root/readControlFile.go
diff options
context:
space:
mode:
Diffstat (limited to 'readControlFile.go')
-rw-r--r--readControlFile.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/readControlFile.go b/readControlFile.go
index 9def952..b307849 100644
--- a/readControlFile.go
+++ b/readControlFile.go
@@ -2,7 +2,6 @@ package main
import (
"bufio"
- "errors"
"os"
"strings"
@@ -11,16 +10,22 @@ import (
// readGitConfig reads and parses the control file
func (c *controlBox) readControlFile() error {
+ pairs := make(map[string]string)
+ var key string
+
file, err := os.Open("control")
if err != nil {
log.Warn("readControlFile() could not find the file")
- return errors.New("'control': file not found")
+ // return errors.New("'control': file not found")
+ // if this happens, make up a fake control file
+ pairs["Maintainer"] = "go-deb build"
+ pairs["Architecture"] = "x86"
+ pairs["Recommends"] = ""
+ pairs["Source"] = "notsure"
+ pairs["Description"] = "put something here"
}
defer file.Close()
- pairs := make(map[string]string)
- var key string
-
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := scanner.Text()