-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add initial provider #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's code that might cause a runtime panic
27d3a2c to
25676bf
Compare
| ret = append(ret, "") | ||
| continue | ||
| if v != nil { | ||
| ret = append(ret, v.(string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we really sure that only interface of type string can reach here? failing that the code will panic.
example from go playground:
package main
import "fmt"
func main() {
var d interface{}
d = 45
fmt.Println(d.(string))
}when running the code above it panics:
panic: interface conversion: interface {} is int, not string
goroutine 1 [running]:
main.main()
/tmp/sandbox615016875/prog.go:10 +0x2e
Program exited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are @NabilHouidi Terraform generates it that way based on the schema
docs/index.md
Outdated
| ## Data Source "dirhash_sha256" | ||
|
|
||
| ## Example Usage | ||
| As noted above, the Dirhash provider can calculate the checksum of a directory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's still a calculate here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Scope
Think-iT-Labs/dirhashin Terraform registryUsage