diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index f8f2440..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM golang:1.22-bullseye - -# Creates an app directory to hold your app’s source code -WORKDIR /app diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 9d2a0e4..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Go PDF Sign", - "dockerFile": "Dockerfile", - "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], - "customizations": { - "vscode": { - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go" - }, - "extensions": ["golang.go"] - } - }, - "containerEnv": { - "TMPDIR": "/workspaces/pdfsign/tmp" - }, - "forwardPorts": [], - "postCreateCommand": "go mod download", - "remoteUser": "root" -} diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5570e31..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 0ad4e77..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build & Test - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: ^1.20 - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... - - - name: Upload coverage report - uses: codecov/codecov-action@v4 - with: - file: ./coverage.txt - flags: unittests - name: codecov-umbrella diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 940c982..0000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: golangci-lint -on: - push: - branches: - - master - - main - pull_request: - -permissions: - contents: read - # Optional: allow read access to pull request. Use with `only-new-issues` option. - # pull-requests: read - -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: '1.22' - cache: false - - name: golangci-lint - uses: golangci/golangci-lint-action@v4 - with: - # Require: The version of golangci-lint to use. - # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. - # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. - version: v1.62 - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # - # Note: By default, the `.golangci.yml` file should be at the root of the repository. - # The location of the configuration file can be changed by using `--config=` - # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 - - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true - - # Optional: if set to true, then all caching functionality will be completely disabled, - # takes precedence over all other caching options. - # skip-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. - # skip-build-cache: true - - # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. - # install-mode: "goinstall" diff --git a/README.md b/README.md index 882134c..a683a6f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,7 @@ # Signing PDF files with Go -[![Build & Test](https://github.com/digitorus/pdfsign/workflows/Build%20&%20Test/badge.svg)](https://github.com/digitorus/pdfsign/actions?query=workflow%3Abuild-and-test) -[![golangci-lint](https://github.com/digitorus/pdfsign/workflows/golangci-lint/badge.svg)](https://github.com/digitorus/pdfsign/actions?query=workflow%3Agolangci-lint) -[![Go Report Card](https://goreportcard.com/badge/github.com/digitorus/pdfsign)](https://goreportcard.com/report/github.com/digitorus/pdfsign) -[![Coverage Status](https://codecov.io/gh/digitorus/pdfsign/branch/main/graph/badge.svg)](https://codecov.io/gh/) -[![Go Reference](https://pkg.go.dev/badge/github.com/digitorus/pdfsign.svg)](https://pkg.go.dev/github.com/digitorus/pdfsign) - This PDF signing library is written in [Go](https://go.dev). The library is in development, might not work for all PDF files and the API might change, bug reports, contributions and suggestions are welcome. -**See also our [PDFSigner](https://github.com/digitorus/pdfsigner/), a more advanced digital signature server that is using this project.** - ## From the command line ``` diff --git a/go.mod b/go.mod index 4949b27..91a2b36 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/digitorus/pdfsign +module gitea.tryanks.com/Tryanks/pdfsign go 1.23.0 diff --git a/sign.go b/sign.go index 1218524..d12ffb3 100644 --- a/sign.go +++ b/sign.go @@ -12,8 +12,8 @@ import ( "os" "time" - "github.com/digitorus/pdfsign/sign" - "github.com/digitorus/pdfsign/verify" + "gitea.tryanks.com/Tryanks/pdfsign/sign" + "gitea.tryanks.com/Tryanks/pdfsign/verify" ) var ( diff --git a/sign/revocation.go b/sign/revocation.go index 0460947..2409c3e 100644 --- a/sign/revocation.go +++ b/sign/revocation.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/digitorus/pdfsign/revocation" + "gitea.tryanks.com/Tryanks/pdfsign/revocation" "golang.org/x/crypto/ocsp" ) diff --git a/sign/revocation_test.go b/sign/revocation_test.go index 96569ee..1f62d7e 100644 --- a/sign/revocation_test.go +++ b/sign/revocation_test.go @@ -9,7 +9,7 @@ import ( "encoding/pem" "testing" - "github.com/digitorus/pdfsign/revocation" + "gitea.tryanks.com/Tryanks/pdfsign/revocation" ) const certPem = `-----BEGIN CERTIFICATE----- diff --git a/sign/sign.go b/sign/sign.go index 371f74c..f29a564 100644 --- a/sign/sign.go +++ b/sign/sign.go @@ -9,8 +9,8 @@ import ( "os" "time" + "gitea.tryanks.com/Tryanks/pdfsign/revocation" "github.com/digitorus/pdf" - "github.com/digitorus/pdfsign/revocation" "github.com/digitorus/pkcs7" "github.com/mattetti/filebuffer" diff --git a/sign/sign_test.go b/sign/sign_test.go index d714374..fd4377f 100644 --- a/sign/sign_test.go +++ b/sign/sign_test.go @@ -12,9 +12,9 @@ import ( "testing" "time" + "gitea.tryanks.com/Tryanks/pdfsign/revocation" + "gitea.tryanks.com/Tryanks/pdfsign/verify" "github.com/digitorus/pdf" - "github.com/digitorus/pdfsign/revocation" - "github.com/digitorus/pdfsign/verify" "github.com/mattetti/filebuffer" ) diff --git a/verify/verify.go b/verify/verify.go index 2474a54..69c528b 100644 --- a/verify/verify.go +++ b/verify/verify.go @@ -12,8 +12,9 @@ import ( "strings" "time" + "gitea.tryanks.com/Tryanks/pdfsign/revocation" "github.com/digitorus/pdf" - "github.com/digitorus/pdfsign/revocation" + "github.com/digitorus/pkcs7" "github.com/digitorus/timestamp" "golang.org/x/crypto/ocsp"