mirror of
https://github.com/mudler/luet.git
synced 2025-08-16 06:23:49 +00:00
ConfigProtect: support annotation without initial /
This commit is contained in:
parent
6819a28f07
commit
e5f44eee09
@ -48,6 +48,9 @@ type ConfigProtect struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewConfigProtect(annotationDir string) *ConfigProtect {
|
func NewConfigProtect(annotationDir string) *ConfigProtect {
|
||||||
|
if len(annotationDir) > 0 && annotationDir[0:1] != "/" {
|
||||||
|
annotationDir = "/" + annotationDir
|
||||||
|
}
|
||||||
return &ConfigProtect{
|
return &ConfigProtect{
|
||||||
AnnotationDir: annotationDir,
|
AnnotationDir: annotationDir,
|
||||||
MapProtected: make(map[string]bool, 0),
|
MapProtected: make(map[string]bool, 0),
|
||||||
|
Loading…
Reference in New Issue
Block a user