dstotijn / go-notion

Go client for the Notion API.
MIT License
380 stars 39 forks source link

Fix json tag #10

Closed sivchari closed 3 years ago

sivchari commented 3 years ago

close #5 I fix the PR.

I've done following .

BTW, I think that it's better to set up CI test.
If CI is set up, it's so easy to confirm what it is failed and how to do.

e.g. following

name: test_and_lint

on:
  push:
    paths-ignore:
      - '*.md'
  pull_request:
    paths-ignore:
      - '*.md'

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
       go-version: ['1.16', '1.15', '1.14']
    steps:
      - name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.goarch }}

      - name: Check out code into the Go module directory
        uses: actions/checkout@v2

      - name: Restore cache
        uses: actions/cache@v1
        with:
          path: ~/go/pkg/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go

      - name: Get dependencies
        run: |
          go mod download

      - name: Test
        run: go test -v ./...

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.29
          args: --disable-all --enable=goimports --enable=golint --enable=govet --enable=errcheck

I've wrote out the code above, so if there's anything you want me to fix, let me know. I'm thinking of fixing it and submitting it as a PR. How about you this proposal?

sivchari commented 3 years ago

@dstotijn thx for review ! I fix it :)