INNER CODE UNIT · Go
initPaths
nisrulz/app-privacy-policy-generator · tools/reviews-page-generator/main.go:60
func initPaths() {
baseDir, _ = os.Getwd()
jsonDir = filepath.Join(baseDir, "comments_json")
imgsDir = filepath.Join(baseDir, "downloaded_images")
tmplPath = filepath.Join(baseDir, "template.mustache")
pubDir = filepath.Join(baseDir, "..", "..", "public")
outPath = filepath.Join(pubDir, "reviews.html")
dataPath = filepath.Join(pubDir, "reviews-data.json")
}
func setupDirs() {
for _, d := range []string{jsonDir, imgsDir} {
os.MkdirAll(d, 0755)
}
}
func fetchComments(client *http.Client, force bool) []ghComment {
var all []ghComment