good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
dcb9614d
Commit
dcb9614d
authored
Mar 20, 2015
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
common: drop unused kind field from Value
This makes Value 24 bytes smaller on 64bit systems.
parent
f7d1d601
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/value.go
+1
-5
1 addition, 5 deletions
common/value.go
with
1 addition
and
5 deletions
common/value.go
+
1
−
5
View file @
dcb9614d
...
@@ -26,10 +26,7 @@ import (
...
@@ -26,10 +26,7 @@ import (
// Value is useful whenever you feel that Go's types limit your
// Value is useful whenever you feel that Go's types limit your
// ability to express yourself. In these situations, use Value and
// ability to express yourself. In these situations, use Value and
// forget about this strong typing nonsense.
// forget about this strong typing nonsense.
type
Value
struct
{
type
Value
struct
{
Val
interface
{}
}
Val
interface
{}
kind
reflect
.
Value
}
func
(
val
*
Value
)
String
()
string
{
func
(
val
*
Value
)
String
()
string
{
return
fmt
.
Sprintf
(
"%x"
,
val
.
Val
)
return
fmt
.
Sprintf
(
"%x"
,
val
.
Val
)
...
@@ -53,7 +50,6 @@ func (val *Value) IsNil() bool {
...
@@ -53,7 +50,6 @@ func (val *Value) IsNil() bool {
}
}
func
(
val
*
Value
)
Len
()
int
{
func
(
val
*
Value
)
Len
()
int
{
//return val.kind.Len()
if
data
,
ok
:=
val
.
Val
.
([]
interface
{});
ok
{
if
data
,
ok
:=
val
.
Val
.
([]
interface
{});
ok
{
return
len
(
data
)
return
len
(
data
)
}
}
...
...
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