Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit f970a77

Browse files
committed
Specify type for all constants, not just the first
Closes #22 Signed-off-by: Dominik Honnef <[email protected]>
1 parent 87c6cf4 commit f970a77

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Diff for: types.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ type Flag uint8
4242
// Constants to use when opening files.
4343
const (
4444
OREAD Flag = 0x00 // open for read
45-
OWRITE = 0x01 // write
46-
ORDWR = 0x02 // read and write
47-
OEXEC = 0x03 // execute, == read but check execute permission
45+
OWRITE Flag = 0x01 // write
46+
ORDWR Flag = 0x02 // read and write
47+
OEXEC Flag = 0x03 // execute, == read but check execute permission
4848

4949
// PROPOSAL(stevvooe): Possible protocal extension to allow the create of
5050
// symlinks. Initially, the link is created with no value. Read and write
5151
// to read and set the link value.
5252

53-
OSYMLINK = 0x04
53+
OSYMLINK Flag = 0x04
5454

55-
OTRUNC = 0x10 // or'ed in (except for exec), truncate file first
56-
OCEXEC = 0x20 // or'ed in, close on exec
57-
ORCLOSE = 0x40 // or'ed in, remove on close
55+
OTRUNC Flag = 0x10 // or'ed in (except for exec), truncate file first
56+
OCEXEC Flag = 0x20 // or'ed in, close on exec
57+
ORCLOSE Flag = 0x40 // or'ed in, remove on close
5858
)
5959

6060
// QType indicates the type of a resource within the Qid.
@@ -63,12 +63,12 @@ type QType uint8
6363
// Constants for use in Qid to indicate resource type.
6464
const (
6565
QTDIR QType = 0x80 // type bit for directories
66-
QTAPPEND = 0x40 // type bit for append only files
67-
QTEXCL = 0x20 // type bit for exclusive use files
68-
QTMOUNT = 0x10 // type bit for mounted channel
69-
QTAUTH = 0x08 // type bit for authentication file
70-
QTTMP = 0x04 // type bit for not-backed-up file
71-
QTFILE = 0x00 // plain file
66+
QTAPPEND QType = 0x40 // type bit for append only files
67+
QTEXCL QType = 0x20 // type bit for exclusive use files
68+
QTMOUNT QType = 0x10 // type bit for mounted channel
69+
QTAUTH QType = 0x08 // type bit for authentication file
70+
QTTMP QType = 0x04 // type bit for not-backed-up file
71+
QTFILE QType = 0x00 // plain file
7272
)
7373

7474
func (qt QType) String() string {

0 commit comments

Comments
 (0)