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

Unified Diff: impl/memory/stringset.go

Issue 1312433013: Switch to external stringset implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix nitish 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/taskqueue_data.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/stringset.go
diff --git a/impl/memory/stringset.go b/impl/memory/stringset.go
deleted file mode 100644
index d803cb1bd065eb85c26f5050653c073b6e2d3505..0000000000000000000000000000000000000000
--- a/impl/memory/stringset.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2015 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 memory
-
-type stringSet map[string]struct{}
-
-func (s stringSet) has(value string) bool {
- _, ret := s[value]
- return ret
-}
-
-// add adds to the set and returns true iff the value was not there before (i.e.
-// it returns true if add actually modifies the stringSet).
-func (s stringSet) add(value string) bool {
- ret := !s.has(value)
- s[value] = struct{}{}
- return ret
-}
-
-func (s stringSet) rm(value string) {
- delete(s, value)
-}
-
-func (s stringSet) dup() stringSet {
- ret := make(stringSet, len(s))
- for v := range s {
- ret.add(v)
- }
- return ret
-}
-
-func (s stringSet) getOne() string {
- for k := range s {
- return k
- }
- return ""
-}
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/taskqueue_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698