Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce7eac8e58 | |||
| 935e69b0e9 | |||
| cbc863b14c | |||
| 0eb0647992 | |||
| a725b66d14 | |||
| 851274954e | |||
| 1580c09746 | |||
| 770f55c8f1 | |||
| 188f0a765f | |||
| a928ab8880 | |||
| 66fc213f64 | |||
| 944400249f | |||
| 1492061ab8 | |||
| 57e1077a85 | |||
| 5a3d483f98 | |||
| 0ff17abd59 | |||
| a742bad084 | |||
| 629b6ee74f |
@@ -67,15 +67,6 @@ func (m *Cluster) ReadFile(name string, args ...any) ([]byte, error) {
|
||||
return fs.ReadFile(m.dir, name)
|
||||
}
|
||||
|
||||
// MkdirAll creates directories relative to the cluster's config directory
|
||||
func (m *Cluster) MkdirAll(name string, args ...any) error {
|
||||
if len(args) > 0 {
|
||||
name = fmt.Sprintf(name, args...)
|
||||
}
|
||||
|
||||
return fs.MkdirAll(m.dir, name, 0755)
|
||||
}
|
||||
|
||||
// ReadLines reads a file from the cluster's config directory,
|
||||
// split by lines, trimmed, and accepting `#` to comment lines out.
|
||||
func (m *Cluster) ReadLines(name string, args ...any) ([]string, error) {
|
||||
@@ -113,3 +104,12 @@ func (m *Cluster) WriteStringFile(value string, name string, args ...any) error
|
||||
_, err = buf.WriteTo(f)
|
||||
return err
|
||||
}
|
||||
|
||||
// MkdirAll creates directories relative to the cluster's config directory
|
||||
func (m *Cluster) MkdirAll(name string, args ...any) error {
|
||||
if len(args) > 0 {
|
||||
name = fmt.Sprintf(name, args...)
|
||||
}
|
||||
|
||||
return fs.MkdirAll(m.dir, name, 0755)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user