Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
13adc63b
Unverified
Commit
13adc63b
authored
Sep 04, 2016
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generated DeepCopy without a function on a struct pointer is wrong
in and out are both pointers to pointers, so *in has to be cast to *Type, not Type.
parent
2ead4ba5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
deepcopy.go
cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go
+1
-1
No files found.
cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go
View file @
13adc63b
...
@@ -609,7 +609,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) {
...
@@ -609,7 +609,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) {
sw
.
Do
(
"if newVal, err := c.DeepCopy(*in); err != nil {
\n
"
,
nil
)
sw
.
Do
(
"if newVal, err := c.DeepCopy(*in); err != nil {
\n
"
,
nil
)
sw
.
Do
(
"return err
\n
"
,
nil
)
sw
.
Do
(
"return err
\n
"
,
nil
)
sw
.
Do
(
"} else {
\n
"
,
nil
)
sw
.
Do
(
"} else {
\n
"
,
nil
)
sw
.
Do
(
"*out = newVal.($.|raw$)
\n
"
,
t
.
Elem
)
sw
.
Do
(
"*out = newVal.(
*
$.|raw$)
\n
"
,
t
.
Elem
)
sw
.
Do
(
"}
\n
"
,
nil
)
sw
.
Do
(
"}
\n
"
,
nil
)
}
}
}
}
...
...
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