(value interface{})
| 225 | } |
| 226 | |
| 227 | func ToInt64(value interface{}) (int64, bool) { |
| 228 | switch value := value.(type) { |
| 229 | case int64: |
| 230 | return value, true |
| 231 | case float64: |
| 232 | return int64(value), true |
| 233 | case int: |
| 234 | return int64(value), true |
| 235 | case json.Number: |
| 236 | if n, err := value.Int64(); err == nil { |
| 237 | return n, true |
| 238 | } |
| 239 | } |
| 240 | return 0, false |
| 241 | } |
| 242 | |
| 243 | func CouchbaseUrlWithAuth(serverUrl, username, password, bucketname string) (string, error) { |
| 244 |
no outgoing calls
no test coverage detected