Skip to content

Instantly share code, notes, and snippets.

View jcreager's full-sized avatar

Joe jcreager

View GitHub Profile
@jcreager
jcreager / fibonacci.go
Created November 9, 2017 02:05
A Tour of Go - Exercise: Fibonacci closure
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
x, y, z := 0, 1, 0
return func() int {
z, x, y = x, y, x+y
2020/07/25 14:12:53 [INFO] Terraform version: 0.12.29
2020/07/25 14:12:53 [INFO] Go runtime version: go1.13.14
2020/07/25 14:12:53 [INFO] CLI args: []string{"/usr/local/bin/terraform", "--version"}
2020/07/25 14:12:53 [DEBUG] Attempting to open CLI config file: /Users/joe/.terraformrc
2020/07/25 14:12:53 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/07/25 14:12:53 [INFO] CLI command args: []string{"version", "--version"}
2020/07/25 14:12:53 [DEBUG] checking for provider in "."
2020/07/25 14:12:53 [DEBUG] checking for provider in "/usr/local/bin"
2020/07/25 14:12:53 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory