Skip to content

Commit

Permalink
#152 Savepoint
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Jul 11, 2024
1 parent 3fed5cb commit a0a8504
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ docker-run:
.PHONY: run
run: run-osarch-specific

# -----------------------------------------------------------------------------
# Documentation
# -----------------------------------------------------------------------------

.PHONY: documentation
documentation: documentation-osarch-specific

# -----------------------------------------------------------------------------
# Package
# -----------------------------------------------------------------------------
Expand Down
21 changes: 15 additions & 6 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ Create a code coverage map.

## Documentation

1. Start `godoc` documentation server.
1. Start [godoc] documentation server.
Example:

```console
cd ${GIT_REPOSITORY_DIR}
godoc
make clean documentation

```

1. Visit [localhost:6060]
1. If a web page doesn't appear, visit [localhost:6060].
1. Senzing documentation will be in the "Third party" section.
`github.com` > `senzing-garage` > `template-go`

Expand All @@ -164,6 +164,14 @@ Example:

[![Go Reference](https://pkg.go.dev/badge/github.com/senzing-garage/template-go.svg)](https://pkg.go.dev/github.com/senzing-garage/template-go)

1. To stop the `godoc` server, run

```console
cd ${GIT_REPOSITORY_DIR}
make clean

```

## Docker

1. Use make target to run a docker images that builds RPM and DEB files.
Expand Down Expand Up @@ -241,9 +249,10 @@ Example:

```

[Go]: https://go.dev/
[clone-repository]: https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/clone-repository.md
[Download and install]: https://go.dev/doc/install
[Go]: https://go.dev/
[godoc]: https://pkg.go.dev/golang.org/x/tools/cmd/godoc
[How to Install Senzing for Go Development]: https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/install-senzing-for-go-development.md
[clone-repository]: https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/clone-repository.md
[localhost:6060]: http://localhost:6060/pkg/github.com/senzing-garage/template-go/
[testcoverage.yaml]: ../.github/coverage/testcoverage.yaml
[localhost:6060]: http://localhost:6060
7 changes: 7 additions & 0 deletions makefiles/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ clean-osarch-specific:
@rm -f $(MAKEFILE_DIRECTORY)/cover.out || true
@rm -fr $(TARGET_DIRECTORY) || true
@rm -fr /tmp/sqlite || true
@pkill godoc || true


.PHONY: coverage-osarch-specific
Expand All @@ -38,6 +39,12 @@ coverage-osarch-specific:
@open file://$(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: documentation-osarch-specific
documentation-osarch-specific:
godoc &
@open http://localhost:6060


.PHONY: hello-world-osarch-specific
hello-world-osarch-specific:
@echo "Hello World, from darwin."
Expand Down
7 changes: 7 additions & 0 deletions makefiles/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ clean-osarch-specific:
@rm -f $(MAKEFILE_DIRECTORY)/cover.out || true
@rm -fr $(TARGET_DIRECTORY) || true
@rm -fr /tmp/sqlite || true
@pkill godoc || true


.PHONY: coverage-osarch-specific
Expand All @@ -34,6 +35,12 @@ coverage-osarch-specific:
@xdg-open $(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: documentation-osarch-specific
documentation-osarch-specific:
godoc &
xdg-open http://localhost:6060


.PHONY: hello-world-osarch-specific
hello-world-osarch-specific:
@echo "Hello World, from linux."
Expand Down
9 changes: 8 additions & 1 deletion makefiles/windows.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ clean-osarch-specific:
del /F /S /Q $(MAKEFILE_DIRECTORY)/cover.out
del /F /S /Q $(TARGET_DIRECTORY)
del /F /S /Q C:\Temp\sqlite
taskkill /f /t/im godoc


.PHONY: coverage-osarch-specific
coverage-osarch-specific:
@go test -v -coverprofile=coverage.out -p 1 ./...
@go tool cover -html="coverage.out" -o coverage.html
@xdg-open file://$(MAKEFILE_DIRECTORY)/coverage.html
@explorer file://$(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: documentation-osarch-specific
documentation-osarch-specific:
@start /b godoc
@explorer http://localhost:6060


.PHONY: hello-world-osarch-specific
Expand Down

0 comments on commit a0a8504

Please sign in to comment.