forked from sunglocto/lambda
troll
This commit is contained in:
17
config.go
Normal file
17
config.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
// This file makes the config directory and returns its location path.
|
||||
|
||||
import (
|
||||
"github.com/kirsle/configdir"
|
||||
)
|
||||
|
||||
func ensureConfig() (string, error) {
|
||||
configPath := configdir.LocalConfig("lambda-im")
|
||||
err := configdir.MakePath(configPath) // Ensure it exists.
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return configPath, nil
|
||||
}
|
||||
Reference in New Issue
Block a user