mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	Fix nil dereference in cloudflare store (#1504)
This commit is contained in:
		| @@ -112,6 +112,9 @@ func (w *workersKV) Init(opts ...store.Option) error { | ||||
| 	if len(w.options.Database) > 0 { | ||||
| 		w.namespace = w.options.Database | ||||
| 	} | ||||
| 	if w.options.Context == nil { | ||||
| 		w.options.Context = context.TODO() | ||||
| 	} | ||||
| 	ttl := w.options.Context.Value("STORE_CACHE_TTL") | ||||
| 	if ttl != nil { | ||||
| 		ttlduration, ok := ttl.(time.Duration) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user