This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/openwrt/uci_struct.go

20 lines
327 B
Go

package openwrt
type UCI struct {
exec Executor
}
func NewUCI() *UCI {
exec := &localExecutor{}
return &UCI{exec}
}
func NewUCIWithExecutor(exec Executor) *UCI {
return &UCI{exec}
}
func (u *UCI) Add(module string, name string) *Action {
commandRes := u.exec.Run("uci add", module, name)
return &Action{commandRes}
}