File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed
Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 44 "log"
55 "os"
66
7- "github.com/golang-book /penv"
7+ "github.com/badgerodon /penv"
88
99 "gopkg.in/alecthomas/kingpin.v2"
1010)
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments