SliceTricks
Russ Cox edited this page 2023-12-14 22:14:45 -05:00
Clone

Wiki Page Revisions

81 Commits

Author SHA1 Message Date
Jeremy Loy
348578226d Added Slice Trick: Batching with minimal allocation 2018-08-13 09:44:20 -04:00
Andrew Stone
ad72ba5abd Updated SliceTricks (markdown) 2018-05-04 13:34:49 -07:00
Axel Wagner
d4a1573309 Shift and Unshift where duplicated 2018-02-04 08:09:46 +01:00
David Pennington
17e6c5cf2b Reverting my change after realizing the title-mismatch 2018-01-19 20:53:12 -06:00
David Pennington
60b270c294 Fixed slice "pop" example. Someone had it matching "shift" 2018-01-19 20:50:27 -06:00
Eugene Russkikh
f2fde5fb85 Updated SliceTricks (markdown) 2017-11-05 00:53:09 +01:00
Sergey Dobrodey
1c45aa5265 Updated SliceTricks (markdown) 2017-10-10 13:25:31 +03:00
Sergey Dobrodey
922463f530 Pop and Pop back operations looks to be swapped 2017-10-10 13:19:56 +03:00
Helmut Kemper
009224836a Updated SliceTricks (markdown) 2017-06-28 12:57:43 -03:00
Helmut Kemper
9d79a99c93 added c like push_back e pop_back 2017-06-28 10:34:07 -03:00
Jagatheesan Jack
ddb2ccfb4e Removed `if a is not the empty slice,` from comment in https://github.com/golang/go/wiki/SliceTricks#copy as `b = append([]T(nil), a...)` works fine when `a = []T{}` 2017-05-14 10:32:01 +08:00
Lars Walen
35b2d5e2b1 Use markdown headers to allow linking to sections 2017-03-21 13:54:47 -07:00
Juliusz Chroboczek
70da14d4e9 Mention that the append trick for copying fails on the empty slice 2016-11-01 19:58:40 +01:00
Ian Lance Taylor
c351557835 The tuple assignment in the delete example was not clearly correct; see issue #15620. 2016-05-09 14:33:59 -07:00
Andrew Stone
61ac3f8cec Updated SliceTricks (markdown) 2015-08-03 19:08:46 -04:00
Andrew Stone
a486e421ad Updated SliceTricks (markdown) 2015-08-03 19:06:08 -04:00
Arjan Velner
0028726fcc correct playground http://play.golang.org/p/qPI9qGKaDB 2015-07-29 10:37:23 +02:00
Arjan Velner
7c8425764e see http://play.golang.org/p/ijiiW9mOw0 2015-07-29 10:32:15 +02:00
alandonovan
bddf9a50a4 remove unnecessary and confusing use of parallel assignment 2015-07-27 16:15:39 -04:00
alandonovan
af2ba0261e Updated SliceTricks (markdown) 2015-07-27 16:14:02 -04:00
lemmi
db4a388b37 I feet this approach is easier to understand due to the clearer setup of the indices. It also shows the use of assignments in for loops with multiple variables. 2015-06-26 17:43:13 +02:00
David Deng
2b4bafd03c Updated SliceTricks (markdown) 2015-04-28 08:01:53 -07:00
Kamil Kisiel
1f35091e41 Added example of reversing 2015-04-20 13:46:59 -07:00
Andrew Stone
7a268d0e85 Add syntax highlighting to all examples 2015-03-11 13:12:10 -04:00
Andrew Stone
55f404a921 Revert incorrect delete change and add a simpler version 2015-03-11 13:10:56 -04:00
Joshua Mervine
0ab65811d7 Replace "[]string" with "[]T" in unshift example. 2015-03-10 22:28:12 -07:00
Joshua Mervine
d37365dd90 Adding "Shift" and "Unshift" examples. 2015-03-10 22:25:29 -07:00
Dave
8f62fba2c2 Make titles use bold, not code formatting 2015-01-08 12:44:59 +11:00
Давид Мзареулян
872f16a794 Looks like a simpler solution? 2015-01-07 12:37:00 +03:00
Dave Day
0d6986a1f7 Fix formatting after import 2014-12-10 15:02:18 +11:00
Andrew Gerrand
5bc444d13c Wiki data import from Google Code 2014-12-10 11:35:11 +11:00