Skip to content

Commit a8353c6

Browse files
committed
fix import
1 parent 2b5f82d commit a8353c6

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

cmd/penv/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"log"
55
"os"
66

7-
"github.com/golang-book/penv"
7+
"github.com/badgerodon/penv"
88

99
"gopkg.in/alecthomas/kingpin.v2"
1010
)

darwin_dao.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//+build darwin
2+
3+
package penv
4+
5+
import (
6+
"os"
7+
"path/filepath"
8+
"runtime"
9+
)
10+
11+
var darwinPlist = `<?xml version="1.0" encoding="UTF-8"?>
12+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
13+
<plist version="1.0">
14+
<dict>
15+
<key>Label</key>
16+
<string>com.github.badgerodon.penv</string>
17+
<key>Program</key>
18+
<string>` + filepath.Join(os.Getenv("HOME"), ".config", "penv.sh") + `</string>
19+
<key>RunAtLoad</key>
20+
<true/>
21+
</dict>
22+
</plist>`
23+
24+
// DarwinDAO is the data access object for OSX
25+
type DarwinDAO struct {
26+
}
27+
28+
func init() {
29+
RegisterDAO(500, func() bool {
30+
return runtime.GOOS == "darwin"
31+
}, &DarwinDAO{})
32+
}
33+
34+
// Load loads the environment
35+
func (dao *DarwinDAO) Load() (*Environment, error) {
36+
panic("NOT IMPLEMENTED")
37+
}
38+
39+
// Save saves the environment
40+
func (dao *DarwinDAO) Save(env *Environment) error {
41+
panic("NOT IMPLEMENTED")
42+
}

0 commit comments

Comments
 (0)