Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: impl/memory/stringset.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: remove limit double-set restriction Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package memory
6
7 type stringSet map[string]struct{}
8
9 func (s stringSet) Add(value string) {
dnj 2015/08/28 20:15:04 nit: Methods should not be exported, since stringS
iannucci 2015/08/28 20:38:50 done. though I usually prefer to export them like
10 s[value] = struct{}{}
11 }
12
13 func (s stringSet) Dup() stringSet {
14 ret := make(stringSet, len(s))
15 for v := range s {
16 ret.Add(v)
17 }
18 return ret
19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698