diff --git a/cmd/rauc-custom-boot-handler/cmd.go b/cmd/rauc-custom-boot-handler/cmd.go index 2c97ad242536699dbe74064449a56565ca231841..a2b63dedc7f73e8b84385c5d16209f75fdcbe0c0 100644 --- a/cmd/rauc-custom-boot-handler/cmd.go +++ b/cmd/rauc-custom-boot-handler/cmd.go @@ -9,7 +9,7 @@ // // The program is a thin D-Bus bridge to the sysotad service, where a compatible // interface is exposed by the RAUC boot adapter hosted service. The logic of -// adapting RAUC interaces to SysOTA boot.Protocol interface is in the package +// adapting RAUC interfaces to SysOTA boot.Protocol interface is in the package // ota/raucadapter. package rauccustomboothandler @@ -38,7 +38,7 @@ var ( errExpectedSlotName = errors.New("expected slot name") // errExpectedSlotState records lack of slot state name argument in "set-state" command. errExpectedSlotState = errors.New("expected slot state") - // errUnexpectedArgument records extraneous unexpected argument to any of the comman. + // errUnexpectedArgument records extraneous unexpected argument to any of the command. errUnexpectedArgument = errors.New("unexpected argument") ) diff --git a/cmd/rauc-post-install-handler/cmd.go b/cmd/rauc-post-install-handler/cmd.go index 983d7edadb5a44656022a8b8ecc4757578ee865c..93bd8be0c85797c79badbf9f583e25c8c5b6ba52 100644 --- a/cmd/rauc-post-install-handler/cmd.go +++ b/cmd/rauc-post-install-handler/cmd.go @@ -9,7 +9,7 @@ // // The program is a thin D-Bus bridge to the sysotad service, where a compatible // interface is exposed by the RAUC boot adapter hosted service. The logic of -// adapting RAUC interaces to SysOTA boot.Protocol interface is in the package +// adapting RAUC interfaces to SysOTA boot.Protocol interface is in the package // ota/raucadapter. package raucpostinstallhandler diff --git a/cmd/rauc-pre-install-handler/cmd.go b/cmd/rauc-pre-install-handler/cmd.go index 438f0febad81426f8ffc88dfab495d42ca9afe62..9ba4d03a6b885a3c8a23022b67737cd33522db13 100644 --- a/cmd/rauc-pre-install-handler/cmd.go +++ b/cmd/rauc-pre-install-handler/cmd.go @@ -9,7 +9,7 @@ // // The program is a thin D-Bus bridge to the sysotad service, where a compatible // interface is exposed by the RAUC boot adapter hosted service. The logic of -// adapting RAUC interaces to SysOTA boot.Protocol interface is in the package +// adapting RAUC interfaces to SysOTA boot.Protocol interface is in the package // ota/raucadapter. package raucpreinstallhandler diff --git a/cmd/sysotad/service.go b/cmd/sysotad/service.go index 9cd975990159b995212e003b35fc2ac7088aca2b..3775a14a7a199decdb80b26a0c683caa37f5cc9d 100644 --- a/cmd/sysotad/service.go +++ b/cmd/sysotad/service.go @@ -23,7 +23,7 @@ import ( "booting.oniroproject.org/distro/components/sysota/pkg/dbusutil" ) -// RequestBusName requests a well-known name on the bus +// RequestBusName requests a well-known name on the bus. // // Bus name must be claimed after creating and exporting the service // object, as it is used as an indicator that a systemd-service is ready @@ -121,7 +121,7 @@ func configuredBootProtocol(cfgGuard *ota.ConfigGuard) (boot.Protocol, error) { // NewService returns a new service. // -// In practice you want to call it with both the WithConfigurer WithStater +// In practice, you want to call it with both the WithConfigurer WithStater // service options. In their absence the service will run devoid of // configuration and state and all changes will be ephemeral. func NewService(conn *dbus.Conn, opts ...Option) (*Service, error) { diff --git a/pkg/dbusutil/servicehost.go b/pkg/dbusutil/servicehost.go index ce7749cdd57e7c20e184cf346b1e4b72af4249a5..b9f1a9a63a11da6ab7b565f9f2e3870ac224d4c6 100644 --- a/pkg/dbusutil/servicehost.go +++ b/pkg/dbusutil/servicehost.go @@ -27,7 +27,7 @@ type ServiceRegistration interface { // path, registration is broken down into individual components. Starting // with the object path needed to register an object. // - // The returned value allows to call call Interface which in turn allows + // The returned value allows calling Interface which in turn allows // registering methods, properties and introspection data. // // Object should be called from HostedService.JoinServiceHost. @@ -50,7 +50,7 @@ type ServiceRegistration interface { // // The hosted service can make any number of calls to // ServiceRegistration.RegisterObject to register distinct objects, distinct -// interfaces or both. In addition the hosted service may call +// interfaces or both. In addition, the hosted service may call // ServiceRegistration.DBusConn to obtain remember the D-Bus connection necessary // to send signals. type HostedService interface { @@ -75,7 +75,7 @@ type ServiceHost struct { objectsProperties map[dbus.ObjectPath]*prop.Properties } -// ObjectRegistration assits in registering D-Bus interfaces for a specific D-Bus object. +// ObjectRegistration assists in registering D-Bus interfaces for a specific D-Bus object. type ObjectRegistration interface { // Interface continues object registration by scoping registration to a // specific interface name. The return value can be used to register @@ -139,7 +139,7 @@ func NewServiceHost(conn *dbus.Conn) *ServiceHost { // Init initializes an existing service host with a given connection. // -// Init should be used when the service host is empbedded inside another type. +// Init should be used when the service host is embedded inside another type. func (sh *ServiceHost) Init(conn *dbus.Conn) { sh.conn = conn } @@ -190,7 +190,7 @@ func (reg *svcRegistration) Object(path dbus.ObjectPath) ObjectRegistration { return r } -// Export exports all of the hosted services to the bus. +// Export exports all the hosted services to the bus. // // Each hosted service added with AddHostedService is asked to provide the set // of object paths, interface names, methods and introspection data by calling @@ -243,7 +243,7 @@ func (sh *ServiceHost) Export() (err error) { // Slice of all the introspection data of the object being worked on. // This allows us to export introspection data across all the interfaces - // in one go, even though individual parts may have come from distint + // in one go, even though individual parts may have come from distinct // hosted services. var allIfacesMeta []introspect.Interface diff --git a/pkg/dbusutil/servicehost_test.go b/pkg/dbusutil/servicehost_test.go index 2754283c4a40acff0381f7973f80bbe15757e3b1..d6d723fcd76b20db49c7af27e802e57eafa8cbbf 100644 --- a/pkg/dbusutil/servicehost_test.go +++ b/pkg/dbusutil/servicehost_test.go @@ -144,7 +144,7 @@ func (s *serviceHostSuite) testCommon(c *C, sh *dbusutil.ServiceHost, ts *TestSe // XXX: Why are 1 and 2 different? c.Check(ts.props.GetMust("Writable"), Equals, "newer-value") - // We can unexport everthing correctly. + // We can unexport everything correctly. c.Assert(sh.Unexport(), IsNil) // After that we cannot call things anymore. diff --git a/pkg/dbusutil/watcher.go b/pkg/dbusutil/watcher.go index 252df42463c8fbb1acb49d61a0a2fb918eaff588..0457ddcf96d0a60983285d5d44f247875c1f773b 100644 --- a/pkg/dbusutil/watcher.go +++ b/pkg/dbusutil/watcher.go @@ -31,7 +31,7 @@ type WatchedObject struct { // NewWatchedObject establishes monitoring of the given D-Bus object. // // All the property changes in the object are reflected locally and can be -// retrieved without incurring additional latency of D-Bus calls. Montoring +// retrieved without incurring additional latency of D-Bus calls. Monitoring // ceases when the context is cancelled. // // Callers should adopt the following structure: @@ -63,12 +63,12 @@ type WatchedObject struct { // // /* Updates have ceased and final state is available for inspection. */ // -// This guarantees that a the terminating condition is never lost. It is +// This guarantees that the terminating condition is never lost. It is // important to check before falling asleep for changes, as the changes may // never arrive if the watched object has reached a "final" state before the // watch was established. func NewWatchedObject(ctx context.Context, conn *dbus.Conn, busName string, path dbus.ObjectPath, ifaces ...string) (w *WatchedObject, err error) { - // Subscribe to all the signals orginating from the operation object. + // Subscribe to all the signals originating from the operation object. matchOpts := []dbus.MatchOption{ dbus.WithMatchSender(busName), dbus.WithMatchObjectPath(path), @@ -121,7 +121,7 @@ func NewWatchedObject(ctx context.Context, conn *dbus.Conn, busName string, path // Start reading incoming D-Bus signals which update the property cache. go w.monitor(ctx, conn, sigCh, func() { - // The context we are given may have been cancelled but we need to + // The context we are given may have been cancelled, but we need to // perform additional blocking operations to tell the bus to refrain // from sending us additional signals. // @@ -162,7 +162,7 @@ func NewWatchedObject(ctx context.Context, conn *dbus.Conn, busName string, path return w, nil } -// Done returns a channel closed when montoring shutdown is complete. +// Done returns a channel closed when monitoring shutdown is complete. func (w *WatchedObject) Done() <-chan struct{} { return w.done } @@ -171,7 +171,7 @@ func (w *WatchedObject) notifyChangeLost() { select { case w.changeLost <- struct{}{}: default: - // Change lost channel is full so we already have a + // Change lost channel is full, so we already have a // pending notification and can safely discard this one. // // The break statement is redundant but makes go-wsl @@ -246,7 +246,7 @@ func (w *WatchedObject) processSignal(sig *dbus.Signal) (iface string, err error } // Update local copy of all the properties while holding the - // write lock. This way callers of CachedProperty will see a + // write-lock. This way callers of CachedProperty will see a // consistent view at the granularity of once interface. w.m.Lock() defer w.m.Unlock() diff --git a/pkg/testutil/witness.go b/pkg/testutil/witness.go index d48a16de469f5f34d15e5260e3e1d9bc51e7601c..411129b6c18cb1b56150708133fce1b3101ebf22 100644 --- a/pkg/testutil/witness.go +++ b/pkg/testutil/witness.go @@ -5,7 +5,7 @@ package testutil import "sync/atomic" -// CallWitness maintains an call counter for test functions. +// CallWitness maintains a call counter for test functions. type CallWitness int32 // Witness increments the call counter.