you want to set a context but you get the error:
error: open /etc/kube/config.lock: permission denied
kubernetes/kubernetes#67676 (comment)
$ kubectl config get-contexts
$ kubectl config use-context "yourContext"| type itemsList struct { | |
| items []int | |
| mapItems map[int][]int | |
| } | |
| func newItemsList() *itemsList { | |
| return &itemsList{ | |
| mapItems: make(map[int][]int), | |
| } |
you want to set a context but you get the error:
error: open /etc/kube/config.lock: permission denied
kubernetes/kubernetes#67676 (comment)
$ kubectl config get-contexts
$ kubectl config use-context "yourContext"| //Opentracing setup | |
| var jaegerCloser io.Closer | |
| var zErr error | |
| var closeJaegerIfNeeded = func() { | |
| if jaegerCloser != nil { | |
| if err := jaegerCloser.Close(); err != nil { | |
| logging.Error("Failed to close tracing with error: %s", err.Error()) | |
| } | |
| jaegerCloser = nil | |
| } |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func repeat(done <-chan interface{}, value interface{}) <-chan interface{} { | |
| output := make(chan interface{}) | |
| go func() { |
| // SnappyJSON type implements json.Marshaler and represents a snappy compressed []byte | |
| type SnappyJSON []byte | |
| // SnappyError wrapper around the error returned from snappy | |
| type SnappyError struct { | |
| json SnappyJSON | |
| err error | |
| } | |
| func (s *SnappyError) Error() string { |
| // | |
| // Rac4VC.swift | |
| // Pop | |
| // | |
| // Created by Edward Ishaq on 3/25/16. | |
| // Copyright © 2016 Zuno. All rights reserved. | |
| // | |
| import UIKit | |
| import Result |
| public protocol Generative { | |
| typealias GeneratedType | |
| var elements: [GeneratedType] { get } | |
| } | |
| public extension Generative { | |
| func count() -> Int { | |
| return elements.count | |
| } |
| extension Array { | |
| func mapSelf<T>(f: Element -> () -> T) -> [T] { | |
| return self.map{ f($0)() } | |
| } | |
| func filterSelf(includedElem: Element -> () -> Bool) -> [Element] { | |
| return self.filter{ includedElem($0)() } | |
| } | |
| } |
| extension Realm { | |
| public class func saveClosure(dbClosure: (Realm)->()) { | |
| do { | |
| let rlm = try Realm() | |
| rlm.write { () -> Void in | |
| dbClosure(rlm) | |
| } | |
| } |
| // Playground - noun: a place where people can play | |
| import UIKit | |
| var str = "Generate random events titles" | |
| let hosts = ["Eddie", "Paul", "Elyse", "MD", "Jon"] | |
| let events = ["Wedding", "Engagement","Birthday"] | |
| let magnitudes = ["Party", "Bash", "Jam"] |