Casey DeLorme 8 лет назад
Родитель
Сommit
606e4b5bff
3 измененных файлов с 1 добавлено и 20 удалено
  1. 0 6
      build
  2. 1 13
      main.go
  3. 0 1
      readme.md

+ 0 - 6
build

@@ -1,6 +0,0 @@
-#!/bin/bash
-rm -rf go staticmd
-export GOPATH=$(pwd)/go
-go get &> /dev/null
-go get -u all &> /dev/null
-go build

+ 1 - 13
main.go

@@ -5,7 +5,6 @@ import (
 	"os"
 	"os/exec"
 	"path/filepath"
-	"runtime"
 	"runtime/pprof"
 	"strconv"
 	"strings"
@@ -54,16 +53,11 @@ func main() {
 
 	// prepare staticmd with dependencies & defaults
 	staticmd := Staticmd{
-		Logger:  log.Logger{Severity: log.Error},
+		Logger:  log.Logger{},
 		Version: version(),
 		Input:   cwd,
 		Output:  filepath.Join(cwd, "public/"),
 	}
-	staticmd.Logger.Color()
-
-	// optimize concurrent processing
-	staticmd.MaxParallelism = runtime.NumCPU()
-	runtime.GOMAXPROCS(staticmd.MaxParallelism)
 
 	// prepare cli options
 	appOptions := option.App{Description: "command line tool for generating deliverable static content"}
@@ -72,7 +66,6 @@ func main() {
 	appOptions.Flag("output", "path to place generated content", "--output", "-o")
 	appOptions.Flag("book", "combine all content into a single file", "--book", "-b")
 	appOptions.Flag("relative", "use relative paths instead of absolute paths", "--relative", "-r")
-	appOptions.Flag("debug", "verbose debug output", "--debug", "-d")
 	appOptions.Flag("profile", "produce profile output to supplied path", "--profile", "-p")
 	appOptions.Example("-t template.tmpl -i . -b")
 	appOptions.Example("-t template.tmpl -i src/ -o out/ -r")
@@ -95,11 +88,6 @@ func main() {
 	staticmd.Input, _ = filepath.Abs(staticmd.Input)
 	staticmd.Output, _ = filepath.Abs(staticmd.Output)
 
-	// optionally enable debugging
-	if debug, _ := maps.Bool(flags, false, "debug"); debug {
-		staticmd.Logger.Severity = log.Debug
-	}
-
 	// optionally enable profiling
 	if profile, _ := maps.String(flags, "", "profile"); profile != "" {
 		f, _ := os.Create(profile)

+ 0 - 1
readme.md

@@ -39,7 +39,6 @@ Its options include:
 - output path
 - single-page output
 - relative links
-- debug mode
 - cpu profiling