Skip to content

Commit

Permalink
Fix typos (#48)
Browse files Browse the repository at this point in the history
* Update dataloader.go

* Update inMemoryCache.go

* Update key.go

* Update README.md

* Update inMemoryCache_go19.go
  • Loading branch information
robinbraemer authored and nicksrandall committed Feb 27, 2019
1 parent 65f631c commit 1232fe3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ You're welcome to install the v1 version of this library.
## Cache
This implementation contains a very basic cache that is intended only to be used for short lived DataLoaders (i.e. DataLoaders that ony exsist for the life of an http request). You may use your own implementation if you want.

> it also has a `NoCache` type that implements the cache interface but all methods are noop. If you do not wish to cache anyting.
> it also has a `NoCache` type that implements the cache interface but all methods are noop. If you do not wish to cache anything.
## Examples
There are a few basic examples in the example folder.
2 changes: 1 addition & 1 deletion dataloader.go
Expand Up @@ -27,7 +27,7 @@ type Interface interface {
Prime(ctx context.Context, key Key, value interface{}) Interface
}

// BatchFunc is a function, which when given a slice of keys (string), returns an slice of `results`.
// BatchFunc is a function, which when given a slice of keys (string), returns a slice of `results`.
// It's important that the length of the input keys matches the length of the output results.
//
// The keys passed to this function are guaranteed to be unique
Expand Down
4 changes: 2 additions & 2 deletions inMemoryCache.go
Expand Up @@ -8,9 +8,9 @@ import (
)

// InMemoryCache is an in memory implementation of Cache interface.
// this simple implementation is well suited for
// This simple implementation is well suited for
// a "per-request" dataloader (i.e. one that only lives
// for the life of an http request) but it not well suited
// for the life of an http request) but it's not well suited
// for long lived cached items.
type InMemoryCache struct {
items map[string]Thunk
Expand Down
4 changes: 2 additions & 2 deletions inMemoryCache_go19.go
Expand Up @@ -8,9 +8,9 @@ import (
)

// InMemoryCache is an in memory implementation of Cache interface.
// this simple implementation is well suited for
// This simple implementation is well suited for
// a "per-request" dataloader (i.e. one that only lives
// for the life of an http request) but it not well suited
// for the life of an http request) but it's not well suited
// for long lived cached items.
type InMemoryCache struct {
items *sync.Map
Expand Down
2 changes: 1 addition & 1 deletion key.go
Expand Up @@ -26,7 +26,7 @@ type StringKey string
// String is an identity method. Used to implement String interface
func (k StringKey) String() string { return string(k) }

// String is an identity method. Used to implement Key Raw
// Raw is an identity method. Used to implement Key Raw
func (k StringKey) Raw() interface{} { return k }

// NewKeysFromStrings converts a `[]strings` to a `Keys` ([]Key)
Expand Down

0 comments on commit 1232fe3

Please sign in to comment.