wolfstudy commented on a change in pull request #4746: [go function] fix: go
function should parse conf content first
URL: https://github.com/apache/pulsar/pull/4746#discussion_r305261400
##########
File path: pulsar-function-go/conf/conf.go
##########
@@ -80,14 +80,34 @@ var (
confContent string
)
+func fileExists(path string) bool {
+ if path == "" {
+ return false
+ }
+ _, err := os.Stat(path)
+ if err != nil && os.IsNotExist(err) {
Review comment:
Yes, in here, we can't simply use `IsNotExist` to make judgments. There are
many types of **PathError**, and the absence of a file is just one of them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services