Check-in [129d90b4a8]
Overview
SHA1:129d90b4a807619a0c54947e655f1ab867d07dcc
Date: 2014-12-26 21:35:59
User: spaskalev
Comment:Added 0dev.org/types, providing aliases that implement sort.Interface for [u]int{8|16|32|64}
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-12-28
17:19
[00c4e0e448] Integrate ioutil.ReadByte from the bpe branch into trunk. (user: spaskalev, tags: trunk)
11:33
[7f9a25c94d] Adding initial pieces of a prototype byte pair encoder (user: spaskalev, tags: bpe)
2014-12-26
21:35
[129d90b4a8] Added 0dev.org/types, providing aliases that implement sort.Interface for [u]int{8|16|32|64} (user: spaskalev, tags: trunk)
16:02
[e72b637df4] Initial implementation of commands/mtf (based on commands/pdc) (user: spaskalev, tags: trunk)
Changes

Added src/0dev.org/types/types.go version [28c92ec651].







































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Package types provides alias types for builtins
// that implement interfaces such as sort.Interface
package types

type Unsigned8 []uint8

func (u Unsigned8) Len() int {
	return len(u)
}

func (u Unsigned8) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Unsigned8) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Unsigned16 []uint16

func (u Unsigned16) Len() int {
	return len(u)
}

func (u Unsigned16) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Unsigned16) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Unsigned32 []uint32

func (u Unsigned32) Len() int {
	return len(u)
}

func (u Unsigned32) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Unsigned32) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Unsigned64 []uint64

func (u Unsigned64) Len() int {
	return len(u)
}

func (u Unsigned64) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Unsigned64) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Signed8 []uint8

func (u Signed8) Len() int {
	return len(u)
}

func (u Signed8) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Signed8) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Signed16 []uint16

func (u Signed16) Len() int {
	return len(u)
}

func (u Signed16) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Signed16) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Signed32 []uint32

func (u Signed32) Len() int {
	return len(u)
}

func (u Signed32) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Signed32) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}

type Signed64 []uint64

func (u Signed64) Len() int {
	return len(u)
}

func (u Signed64) Less(i, j int) bool {
	return u[i] < u[j]
}

func (u Signed64) Swap(i, j int) {
	u[i], u[j] = u[j], u[i]
}