Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 093d2a506c | |||
| 47af4b2020 | |||
| ee2ac83536 | |||
| dc2c690151 | |||
| 285a2fa324 | |||
| 5d95b4509b | |||
| 6a6cdfcfe8 | |||
| 8866650a47 | |||
| b1544c251c | |||
| 7ea3906d63 | |||
| 6e0bf95fdf | |||
| 472b014a74 | |||
| 30b15da87d | |||
| da38250465 | |||
| bdf0192ac5 | |||
| 194f03c86a |
@@ -67,6 +67,15 @@ 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) {
|
||||
@@ -104,12 +113,3 @@ 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