diff options
| author | Jeff Carr <[email protected]> | 2024-11-07 07:03:13 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-07 07:03:13 -0600 |
| commit | 3961caa1792c68dc215a9b8c51965e6fd0518f2f (patch) | |
| tree | 77b97fbdaa97b93161418555e77c4586b50944b8 /readControlFile.go | |
| parent | 62feeab08e27b22215ed4be51df77986876d55d7 (diff) | |
attempt to make a fake control filev0.22.5
Diffstat (limited to 'readControlFile.go')
| -rw-r--r-- | readControlFile.go | 15 |
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() |
