Skip to content

Commit

Permalink
chore: Bump go version to 1.20 (#240)
Browse files Browse the repository at this point in the history
* chore: Bump go version to 1.20

* chore: Bump gotools to v0.2.1

* ci: Update linter run script

* ci: Increase linter timeout
  • Loading branch information
obalunenko authored Feb 2, 2023
1 parent 75b4760 commit bbbf23b
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

github: [obalunenko]
github: [ obalunenko ]
32 changes: 16 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Build
run: |
make build
- name: Build
run: |
make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
20 changes: 10 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- "master"
pull_request:
types: [opened, synchronize, reopened]
types: [ opened, synchronize, reopened ]
branches:
- "*"
paths:
Expand All @@ -26,8 +26,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: ["ubuntu-22.04"]
go: ["1.19"]
os: [ "ubuntu-22.04" ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Build
steps:
Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: ["ubuntu-22.04"]
go: ["1.19"]
os: [ "ubuntu-22.04" ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Run Tests
steps:
Expand Down Expand Up @@ -130,8 +130,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: ["ubuntu-22.04"]
go: ["1.19"]
os: [ "ubuntu-22.04" ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Run linters
steps:
Expand Down Expand Up @@ -177,13 +177,13 @@ jobs:
shell: bash

reports:
needs: [linting, testing, build]
needs: [ linting, testing, build ]
strategy:
fail-fast: true
max-parallel: 1
matrix:
os: ["ubuntu-22.04"]
go: ["1.19"]
os: [ "ubuntu-22.04" ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Quality reports
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.19' ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Build
steps:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.19' ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Regression tests
steps:
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.19' ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Lint
steps:
Expand Down Expand Up @@ -156,13 +156,13 @@ jobs:
shell: bash

release:
needs: [build, regression_test, linting]
needs: [ build, regression_test, linting ]
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.19' ]
go: [ "1.20" ]
runs-on: ${{ matrix.os }}
name: Release
steps:
Expand Down
3 changes: 1 addition & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ builds:
ldflags:
- "{{ .Env.GO_BUILD_LDFLAGS }}"
universal_binaries:
-
# ID of the source build
- # ID of the source build
#
# Defaults to the project name.
id: cli
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APP_NAME?=instadiff-cli
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)


GOTOOLS_IMAGE_TAG?=v0.1.4
GOTOOLS_IMAGE_TAG?=v0.2.1
SHELL := env GOTOOLS_IMAGE_TAG=$(GOTOOLS_IMAGE_TAG) $(SHELL)

COMPOSE_TOOLS_FILE=deployments/docker-compose/go-tools-docker-compose.yml
Expand Down
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ Example of config file:

```json
{
"instagram":{
"whitelist":[
"instagram": {
"whitelist": [
"user1",
"user2",
"user3",
"1234567"
],
"limits":{
"unfollow":100
"limits": {
"unfollow": 100
},
"sleep": 7
},
Expand All @@ -113,15 +113,17 @@ Example of config file:
```

* instagram: it is a config for instagram
* whitelist: list of followings that will be not unfollowed even if they are not mutual (usernames and ID's supported both).
* whitelist: list of followings that will be not unfollowed even if they are not mutual (usernames and ID's
supported both).
* limits: limits per one run.
* unfollow: number of users that could be unfollowed in one run (be careful with big number - account could be banned)
* unfollow: number of users that could be unfollowed in one run (be careful with big number - account could be
banned)
* sleep: sleep interval in seconds between each unfollow request to prevent account ban for ddos reason.
* storage: it's a config for database storage.
* local: if true, memory cache will be used and connection to mongo will be not set.
* mongo: is a config for mongo database
- url: url of mongo DB to connect
- db: name of Database
* storage: it's a config for database storage.
* local: if true, memory cache will be used and connection to mongo will be not set.
* mongo: is a config for mongo database
- url: url of mongo DB to connect
- db: name of Database

Create a json file with configuration and pass the path to it via flag `--config_path`

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/obalunenko/instadiff-cli

go 1.19
go 1.20

require (
github.com/Davincible/goinsta/v3 v3.2.6
Expand Down
2 changes: 1 addition & 1 deletion scripts/linting/golangci-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ checkInstalled golangci-lint
echo "Linting..."

golangci-lint run --out-format=github-actions --no-config --disable-all -E govet
golangci-lint run --config .golangci.pipe.yml
golangci-lint run --timeout=10m --out-format=github-actions --config .golangci.pipe.yml

echo "${SCRIPT_NAME} done."
2 changes: 1 addition & 1 deletion scripts/linting/golangci-sonar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ checkInstalled golangci-lint

echo "Linting..."

golangci-lint run --config .golangci.yml > linters.out
golangci-lint run --timeout=10m --config .golangci.yml > linters.out

echo "${SCRIPT_NAME} done."

0 comments on commit bbbf23b

Please sign in to comment.