route support no request and response (#178)

* add more test and support no request and response

* fix slash when run on windows

* optimize test
This commit is contained in:
kingxt
2020-11-02 13:48:16 +08:00
committed by GitHub
parent 4c9315e984
commit b776468e69
4 changed files with 42 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ func getParentPackage(dir string) (string, error) {
}
parent := filepath.Clean(goctlutil.JoinPackages(p.GoMod.Module, absPath[len(goModePath):]))
parent = strings.ReplaceAll(parent, "\\", "/")
parent = strings.ReplaceAll(parent, `\`, "/")
return parent, nil
}