Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
74c10146
Commit
74c10146
authored
Nov 28, 2018
by
Litian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add go stack vendor
parent
c7c6f16a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
0 deletions
+72
-0
LICENSE
vendor/github.com/golang-collections/collections/LICENSE
+21
-0
stack.go
.../github.com/golang-collections/collections/stack/stack.go
+45
-0
vendor.json
vendor/vendor.json
+6
-0
No files found.
vendor/github.com/golang-collections/collections/LICENSE
0 → 100644
View file @
74c10146
Copyright (c) 2012 Caleb Doxsey
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
vendor/github.com/golang-collections/collections/stack/stack.go
0 → 100644
View file @
74c10146
package
stack
type
(
Stack
struct
{
top
*
node
length
int
}
node
struct
{
value
interface
{}
prev
*
node
}
)
// Create a new stack
func
New
()
*
Stack
{
return
&
Stack
{
nil
,
0
}
}
// Return the number of items in the stack
func
(
this
*
Stack
)
Len
()
int
{
return
this
.
length
}
// View the top item on the stack
func
(
this
*
Stack
)
Peek
()
interface
{}
{
if
this
.
length
==
0
{
return
nil
}
return
this
.
top
.
value
}
// Pop the top item of the stack and return it
func
(
this
*
Stack
)
Pop
()
interface
{}
{
if
this
.
length
==
0
{
return
nil
}
n
:=
this
.
top
this
.
top
=
n
.
prev
this
.
length
--
return
n
.
value
}
// Push a value onto the top of the stack
func
(
this
*
Stack
)
Push
(
value
interface
{})
{
n
:=
&
node
{
value
,
this
.
top
}
this
.
top
=
n
this
.
length
++
}
\ No newline at end of file
vendor/vendor.json
View file @
74c10146
...
@@ -119,6 +119,12 @@
...
@@ -119,6 +119,12 @@
"revisionTime"
:
"2018-11-04T16:40:17Z"
"revisionTime"
:
"2018-11-04T16:40:17Z"
},
},
{
{
"checksumSHA1"
:
"06pu4WTqbWBAHCJhCLZaI1droeM="
,
"path"
:
"github.com/golang-collections/collections/stack"
,
"revision"
:
"604e922904d35e97f98a774db7881f049cd8d970"
,
"revisionTime"
:
"2013-07-29T18:54:59Z"
},
{
"checksumSHA1"
:
"BP2buXHHOKxI5eYS2xELVng2kf4="
,
"checksumSHA1"
:
"BP2buXHHOKxI5eYS2xELVng2kf4="
,
"path"
:
"github.com/golang/protobuf/jsonpb"
,
"path"
:
"github.com/golang/protobuf/jsonpb"
,
"revision"
:
"951a149f90371fb8858c6c979d03bb2583611052"
,
"revision"
:
"951a149f90371fb8858c6c979d03bb2583611052"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment