Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ring
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
ring
Commits
7e62ff2b
Commit
7e62ff2b
authored
5 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
renamed the creator function
parent
5db55469
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ringBuff.go
+1
-1
1 addition, 1 deletion
ringBuff.go
ringBuff_test.go
+1
-1
1 addition, 1 deletion
ringBuff_test.go
with
2 additions
and
2 deletions
ringBuff.go
+
1
−
1
View file @
7e62ff2b
...
...
@@ -33,7 +33,7 @@ type Buff struct {
}
// Initialize a new ring buffer with length n
func
New
Ring
Buff
(
n
int
,
id
idFunc
)
*
Buff
{
func
NewBuff
(
n
int
,
id
idFunc
)
*
Buff
{
rb
:=
&
Buff
{
buff
:
make
([]
interface
{},
n
),
count
:
n
,
...
...
This diff is collapsed.
Click to expand it.
ringBuff_test.go
+
1
−
1
View file @
7e62ff2b
...
...
@@ -17,7 +17,7 @@ func id(val interface{}) int {
// Setup func for tests
func
setup
()
*
Buff
{
rb
:=
New
Ring
Buff
(
5
,
id
)
rb
:=
NewBuff
(
5
,
id
)
for
i
:=
1
;
i
<=
5
;
i
++
{
rb
.
Push
(
&
Tester
{
Id
:
i
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment