Skip to content

Commit e9d0c6a

Browse files
committed
whitespace changes
1 parent 168ace4 commit e9d0c6a

File tree

8 files changed

+29
-23
lines changed

8 files changed

+29
-23
lines changed

app/evdev/evdev.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import (
1313

1414
// https://github.com/gvalkov/golang-evdev implements what we do, but requires Cgo
1515

16-
/* Hunting the numeric code for EVIOCGRAB was an absolute pain (none of these specify it legibly):
16+
/*
17+
Hunting the numeric code for EVIOCGRAB was an absolute pain (none of these specify it legibly):
1718
1819
- https://github.com/gvalkov/golang-evdev/search?q=EVIOCGRAB&unscoped_q=EVIOCGRAB
1920
- https://github.com/pfirpfel/node-exclusive-keyboard/blob/master/lib/eviocgrab.cpp

app/evdev/numpad.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package evdev
22

33
// represents numpad key's meaning for both on and off cases for num lock
4-
// https://en.wikipedia.org/wiki/Num_Lock
4+
//
5+
// https://en.wikipedia.org/wiki/Num_Lock
56
type numpadKeyPair struct {
67
withNumLock KeyOrButton
78
withoutNumLock KeyOrButton

crypto/pkencryptedstream/stream.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Use public key crypto to encrypt a data stream in a way, that the encrypting party can
22
// not necessarily decrypt the same data (unless she possesses the private key as well).
33
//
4-
// DEPRECATED: this provides confidentiality, but is malleable (ciphertext is not authenticated)
5-
// use Age instead
4+
// DEPRECATED: this provides confidentiality, but is malleable (ciphertext is not authenticated).
5+
// use Age instead.
66
package pkencryptedstream
77

88
/* Public key (RSA) encrypted stream:
@@ -87,10 +87,11 @@ var (
8787
)
8888

8989
// Format:
90-
// <len of below envelope>
91-
// <encrypted AES key envelope: RSA-OAEP-SHA256>
92-
// <iv>
93-
// <ciphertext stream>
90+
//
91+
// <len of below envelope>
92+
// <encrypted AES key envelope: RSA-OAEP-SHA256>
93+
// <iv>
94+
// <ciphertext stream>
9495
func Writer(destination io.Writer, pubKey *rsa.PublicKey) (io.WriteCloser, error) {
9596
// generate new 256-bit AES key
9697
aesKey := make([]byte, aes256KeyBytes)

crypto/storedpassword/serialization.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import (
99

1010
// format: $<strategyId>$<salt>$<derived>
1111
// trying to be somewhat compatible with
12-
// https://passlib.readthedocs.io/en/stable/modular_crypt_format.html#application-defined-hashes
12+
// https://passlib.readthedocs.io/en/stable/modular_crypt_format.html#application-defined-hashes
13+
//
1314
// with the exception that we're storing the cost in the <strategyId> so that we don't have
1415
// to implement different parsing formats per strategy
1516
type StoredPassword string

crypto/storedpassword/storeandverify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func Store(plaintext string, strategy DerivationStrategy) (StoredPassword, error
3636

3737
// 1st return: if != "" is the upgraded version of the stored password, if upgraded DerivationStrategy found
3838
// 2nd return: nil if hash matches and no internal errors occurred.
39-
// ErrIncorrectPassword if no internal errors but hash doesn't match.
39+
// ErrIncorrectPassword if no internal errors but hash doesn't match.
4040
//
4141
// this function is safe from timing attacks
4242
func Verify(stored StoredPassword, givenPlaintext string, resolver StrategyResolver) (StoredPassword, error) {

os/user/userutil/privileges_linux.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ type UnprivilegedUser interface {
6767
// same as DropToUnprivilegedUser() but UnprivilegedUser is only an optional outcome, the only thing
6868
// guaranteed is PrivilegedWork. this means that:
6969
//
70-
// - we definitely can elevate
71-
// - but we might not be running as unprivileged user (we were not run under '$ sudo' so we cannot
72-
// jump between unprivileged and privileged contexts)
70+
// - we definitely can elevate
71+
// - but we might not be running as unprivileged user (we were not run under '$ sudo' so we cannot
72+
// jump between unprivileged and privileged contexts)
7373
//
7474
// WARNING: this alters global process state, so you shouldn't be doing anything concurrent.
7575
// (at least where the different operations would be bothered by running in different security context)
@@ -170,13 +170,15 @@ func (r *runningUnderSudo) AsRoot(work func(ProofOfRunningAsRoot) error) error {
170170
// this is useful for e.g. writing user's owned file on directory only root can write to.
171171
//
172172
// Running a process as root, before this function call (from /proc/self/status):
173-
// Uid: 0 0 0 0
174173
//
175-
// (values are: "Real, effective, saved set, and filesystem UIDs")
176-
// https://man7.org/linux/man-pages/man5/proc.5.html
174+
// Uid: 0 0 0 0
175+
//
176+
// (values are: "Real, effective, saved set, and filesystem UIDs")
177+
// https://man7.org/linux/man-pages/man5/proc.5.html
177178
//
178179
// After this function call:
179-
// Uid: 0 1000 0 1000
180+
//
181+
// Uid: 0 1000 0 1000
180182
//
181183
// => makes changes to (drops privileges of):
182184
// - Real : ☐

sync/syncutil/mutexmap.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// When you TryLock():
1010
// a) it won't open if it's already occupied. (because it's locked inside) decide to do something else
1111
// b) it opens and you get in and the stall gets reserved/locked for you. When you get out
12-
// you call the unlock callback you obtained from TryLock() to return the stall for use.
12+
// you call the unlock callback you obtained from TryLock() to return the stall for use.
1313
type MutexMap struct {
1414
// value is chan that Lock() can use to listen for unlock event (close of channel)
1515
locks map[string]chan bool

sync/taskrunner/taskrunner.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// Works similar to golang.org/x/sync/errgroup but provides richer logging (tasks are
44
// named) and errors
55
//
6-
// - The tasks are expected to run forever, until context cancellation (e.g. task stopping
7-
// before cancellation even with nil error is considered an error).
8-
// - If any of the tasks fail, sibling tasks are canceled as well.
6+
// - The tasks are expected to run forever, until context cancellation (e.g. task stopping
7+
// before cancellation even with nil error is considered an error).
8+
// - If any of the tasks fail, sibling tasks are canceled as well.
99
package taskrunner
1010

1111
import (
@@ -76,8 +76,8 @@ func (t *Runner) Done() <-chan error {
7676
// - err if any of the tasks exited unexpectedly or exit was expected but errored
7777
//
7878
// NOTE: don't have multiple goroutines concurrently use Done() or Wait(). i.e. you can
79-
// call Done() and even after that call Wait(), but don't do it concurrently (the
80-
// channel only sends one value)
79+
// call Done() and even after that call Wait(), but don't do it concurrently (the
80+
// channel only sends one value)
8181
func (t *Runner) Wait() error {
8282
return <-t.Done()
8383
}

0 commit comments

Comments
 (0)