Index: common/api/dm/service/v1/graph_data_clone.go |
diff --git a/common/api/dm/service/v1/graph_data_clone.go b/common/api/dm/service/v1/graph_data_clone.go |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2b5b2220c3c3d0cc14b645ff056c5cee4c3213d6 |
--- /dev/null |
+++ b/common/api/dm/service/v1/graph_data_clone.go |
@@ -0,0 +1,16 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package dm |
+ |
+// Clone returns a deep copy of this Quest_Desc. |
dnj (Google)
2016/06/16 16:57:22
nit: mention that this only works on Normalized de
iannucci
2016/06/18 01:35:41
Switched to proto.Clone anyway :)
|
+func (d *Quest_Desc) Clone() *Quest_Desc { |
+ ret := *d |
+ meta := *ret.Meta |
+ retry := *meta.Retry |
+ |
+ meta.Retry = &retry |
+ ret.Meta = &meta |
+ return &ret |
+} |