Skip to content

Commit

Permalink
Inout bump (#26)
Browse files Browse the repository at this point in the history
* make #SetLang public

* detect language based on the <html lang="...">

* added benchmark for the HTML parser

* bumped Go to 1.20; bumped `github.com/zoomio/inout` to v0.13.0.
  • Loading branch information
smeshkov authored Jul 8, 2023
1 parent ed02c9e commit 09deee9
Show file tree
Hide file tree
Showing 16 changed files with 4,666 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 3,6 @@
/cli
vendor/
*.out
*.test
*.cpu
coverage.txt
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 1,10 @@
# Changelog

## v0.61.0

- bumped Go to 1.20;
- bumped `github.com/zoomio/inout` to v0.13.0.

## v0.60.2

- fixed dictionary loader for segmenter for Chinese & Japanese languages.
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 1,9 @@
# Contributing

## Testing

- benchmarks are `func BenchmarkXxx(b *testing.B) {` use `go test -v -run=^$ -bench=<BenchmarkXxx> -cpuprofile=prof.cpu ./<path_to_package>`, then profiling `go tool pprof <package>.test prof.cpu`

## Guidelines for pull requests

- Write tests for any changes.
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 1,13 @@
.PHONY: deps clean build

TAG=0.60.2
TAG=0.61.0
BINARY=tagify
DIST_DIR=_dist
OS=darwin
ARCH=arm64
VERSION=tip
USER_BIN=${HOME}/bin
DATE=`date %m-%d-%Y-%H-%M-%S`

deps:
go get -u ./...
Expand All @@ -27,6 28,9 @@ profile:
./_dist/tagify_darwin -s=https://zoomio.org/blog/post/mock_server-5632006343884800 -cpuprofile=_dist/tagify_darwin.prof
go tool pprof _dist/tagify_darwin _dist/tagify_darwin.prof

bench:
go test github.com/zoomio/tagify/processor/html -bench=. -run=ParseHTML -count=5 | tee _dist/parse_html_${DATE}.txt

tag:
./_bin/tag.sh ${TAG}

Expand Down
2 changes: 1 addition & 1 deletion _dist/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
/tagify*
*.out
coverage.txt
*.txt
*.prof
*.svg
*.png
Expand Down
Loading

0 comments on commit 09deee9

Please sign in to comment.