Skip to content

Commit

Permalink
typo: OpenWRT → OpenWrt
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
dmke committed Sep 18, 2021
1 parent 9f65182 commit 749d626
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

> **WORK IN PROGRESS**
[![GoDoc][godoc-badge]][godoc]
[![GoDoc](https://pkg.go.dev/badge/github.com/digineo/go-uci.svg)][https://pkg.go.dev/github.com/digineo/go-uci]
[![Test results](https://github.com/digineo/go-uci/workflows/Test/badge.svg)](https://github.com/digineo/go-uci/actions?query=workflow%3ATest)
[![Lint results](https://github.com/digineo/go-uci/workflows/Lint/badge.svg)](https://github.com/digineo/go-uci/actions?query=workflow%3ALint)
[![Codecov](http://codecov.io/github/digineo/go-uci/coverage.svg?branch=master)](http://codecov.io/github/digineo/go-uci?branch=master)


[godoc]: https://pkg.go.dev/github.com/digineo/go-uci
[godoc-badge]: https://pkg.go.dev/badge/github.com/digineo/go-uci.svg

UCI is OpenWRT's [Unified Configuration Interface][uci-wiki]. It is
used to configure OpenWRT router hardware using a simple DSL (and
UCI is OpenWrt's [Unified Configuration Interface][uci-wiki]. It is
used to configure OpenWrt router hardware using a simple DSL (and
acompanying CLI tools). Configuration files are written into a
central directory (`/etc/config/*`) which basically represents a
key/value store.
Expand All @@ -31,7 +28,7 @@ parser/lexer.

## Why?

We're currently experimenting with Go binaries on OpenWRT router
We're currently experimenting with Go binaries on OpenWrt router
hardware and need a way to interact with the system configuration.
We could have created bindings for [`libuci`][uci-git], but the
turnaround cycle in developing with CGO is a bit tedious. Also, since
Expand All @@ -41,7 +38,7 @@ GCCGO, which has other quirks.
The easiest solution therefore is a plain Go library, which can be
used in Go (with or without CGO) and GCCGO without worrying about
interoperability. A library also allows UCI to be used outside of
OpenWRT systems (e.g. for provisioning).
OpenWrt systems (e.g. for provisioning).

[uci-git]: https://git.openwrt.org/?p=project/uci.git;a=summary

Expand All @@ -55,7 +52,7 @@ func main() {
// use the default tree (/etc/config)
if values, ok := uci.Get("system", "@system[0]", "hostname"); ok {
fmt.Println("hostanme", values)
//=> hostname [OpenWRT]
//=> hostname [OpenWrt]
}

// use a custom tree
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Package uci implements a binding to OpenWRT's UCI (Unified Configuration
Package uci implements a binding to OpenWrt's UCI (Unified Configuration
Interface) files in pure Go.
The typical use case is reading and modifying UCI config options:
Expand All @@ -9,7 +9,7 @@ The typical use case is reading and modifying UCI config options:
uci.Set("network", "lan", "ipaddr", "192.168.7.1")
uci.Commit() // or uci.Revert()
For more details head over to the OpenWRT wiki, or dive into UCI's C
For more details head over to the OpenWrt wiki, or dive into UCI's C
source code:
- https://openwrt.org/docs/guide-user/base-system/uci
- https://git.openwrt.org/?p=project/uci.git;a=summary
Expand Down
4 changes: 2 additions & 2 deletions uci.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// Tree defines the base directory for UCI config files. The default value
// on OpenWRT devices point to /etc/config, so that is what the default
// on OpenWrt devices point to /etc/config, so that is what the default
// tree uses as well (you can access the default tree with the package level
// functions with the same signature as in this interface).
type Tree interface {
Expand Down Expand Up @@ -342,7 +342,7 @@ func (t *tree) saveConfig(c *config) error {
//
// The full path for f will hence be "$root/.$rnd.$name", which
// translates to something like "/etc/config/.42.network" on
// OpenWRT devices.
// OpenWrt devices.
//
// We rely a bit on the fact that UCI ignores dotfiles in /etc/config,
// so this should not interfere with normal operations when we leave
Expand Down

0 comments on commit 749d626

Please sign in to comment.