summaryrefslogtreecommitdiff
path: root/handlers.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-19 05:56:02 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-19 05:56:02 -0400
commitca8eb1d421cbe4dbe6f80312b9cc6e1f9ed4a47c (patch)
tree102b16f0ec57f81cb39e3a866832757c5aef3eb0 /handlers.go
parent258aa565321493fbf6b4325d7b00dbb2058d646a (diff)
privatize some methods
Diffstat (limited to 'handlers.go')
-rw-r--r--handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/handlers.go b/handlers.go
index 5f9470ab1..d65361595 100644
--- a/handlers.go
+++ b/handlers.go
@@ -36,7 +36,7 @@ func recv(buf []byte) []byte {
}
func HandleSourceCodeFetch(moduleSpecifier string, containingFile string) (out []byte) {
- Assert(moduleSpecifier != "", "moduleSpecifier shouldn't be empty")
+ assert(moduleSpecifier != "", "moduleSpecifier shouldn't be empty")
res := &Msg{}
var sourceCodeBuf []byte
var err error
@@ -57,13 +57,13 @@ func HandleSourceCodeFetch(moduleSpecifier string, containingFile string) (out [
//println("HandleSourceCodeFetch", "moduleSpecifier", moduleSpecifier,
// "containingFile", containingFile, "filename", filename)
- if IsRemote(moduleName) {
+ if isRemote(moduleName) {
sourceCodeBuf, err = FetchRemoteSource(moduleName, filename)
} else if strings.HasPrefix(moduleName, assetPrefix) {
f := strings.TrimPrefix(moduleName, assetPrefix)
sourceCodeBuf, err = Asset("dist/" + f)
} else {
- Assert(moduleName == filename,
+ assert(moduleName == filename,
"if a module isn't remote, it should have the same filename")
sourceCodeBuf, err = ioutil.ReadFile(moduleName)
}