Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the project architecture and optimize the code logic. #17

Merged
merged 7 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 📜 官方文档 | GO Ldap Admin Doc
url: http://ldapdoc.eryajf.net
about: 关于项目的功能用法以及设计考量,都会在官网进行呈现,提交问题之前,请先阅读官方文档,如果还不能满足,则再提问题。 | Regarding the functional usage and design considerations of the project, they will be presented on the official website. Before submitting the question, please read the official document first. If it is not satisfied, you will ask the question.
- name: 👀 Github论坛 | GitHub Discussions
url: https://github.com/eryajf/go-ldap-admin/discussions
about: 如果您的问题不是功能或者错误,请转到讨论面板并在提交之前检索您的问题是否已经存在。 | If your question is not a feature or a bug, please go to the discussion panel and retrieve if your question already exists before submitting.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 🐛 错误报告 | Bug Report
about: 请详细描述您使用过程中遇到的问题。| Please describe in detail the problems you encountered in the process of using.
title: "🐛 一些问题。。。 | [Bug] Some problem..."
labels: ["bug"]
---

<!-- 请在您提交 bug 之前,回答以下这些问题。 | Please answer these questions before you submit a bug. -->

#### 您使用的版本? | Your usage version?

#### 您使用的场景? | Your usage scenarios?

#### 您做了什么操作? | What did you do?

#### 您遇到了什么问题? | What are your problems?

#### 您期望的结果是怎样的? | What is your expected outcome?
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 🚀 功能请求 | Feature Request
about: 请详细描述您期望的功能。 | Please describe in detail the features you expect.
title: "🚀 一些功能。。。 | [Feature]Some feature..."
labels: ["enhancement"]
---

<!-- 请在您提交期望的功能之前,回答以下这些问题。 | Please answer these questions before you submit the desired feature. -->

#### 您使用的场景? | 1. Your usage scenarios?

#### 您期望的结果是怎样的? | 2. What is your expected outcome?
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/question-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: 🙋 问题交流 | Question Report
about: 在文档或讨论中没有回答的使用问题 | Usage question that isn't answered in docs or discussion
title: "🙋 问题交流。。。 | [Question] Some question..."
labels: ["question"]
---

## Question Report

- 搜索打开和关闭的 [GitHub 问题](https://github.com/eryajf/go-ldap-admin/issues)

请在提交问题之前回答这些问题,谢谢。 | Please answer these questions before submitting them. Thank you.

### 你使用了哪个版本? | Which version did you use?

### 预期行为 | Expected behavior

### 实际行为 | Actual behavior

### 原因分析(如果可以) | Cause analysis (if possible)

### 问题重现步骤 | Steps to reproduce the problem
39 changes: 38 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
name-template: 'v$NEXT_PATCH_VERSION 🌈'
tag-template: 'v$NEXT_PATCH_VERSION'
version-template: $MAJOR.$MINOR.$PATCH
# Emoji reference: https://gitmoji.carloscuesta.me/
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'kind/feature'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'regression'
- 'kind/bug'
- title: 📝 Documentation updates
labels:
- documentation
- 'kind/doc'
- title: 👻 Maintenance
labels:
- chore
- dependencies
- 'kind/chore'
- 'kind/dep'
- title: 🚦 Tests
labels:
- test
- tests
exclude-labels:
- reverted
- no-changelog
- skip-changelog
- invalid
change-template: '* $TITLE (#$NUMBER) @$AUTHOR'
template: |
## What’s Changed

$CHANGES
24 changes: 12 additions & 12 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%d_%H-%M')"
-
name: Set up QEMU

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Available platforms

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Login to DockerHub

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: golangci-lint

on: [push, pull_request]

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
21 changes: 21 additions & 0 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Issue Reply

on:
issues:
types: [labeled]

jobs:
reply-helper:
runs-on: ubuntu-latest
steps:
- name: help wanted
if: github.event.label.name == 'help wanted' || github.event.label.name == 'enhancement' || github.event.label.name == 'bug' || github.event.label.name == 'question'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.ACCESS_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
您好 @${{ github.event.issue.user.login }}👋,我已收到您的反馈,我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。

Hello @${{ github.event.issue.user.login }}. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
*.dylib
.idea
.vscode
.token

build.sh
logs
go-web-mini
go-ldap-admin

# Test binary, built with `go test -c`
*.test

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ build-linux:
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o go-ldap-admin main.go

build-linux-arm:
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -o go-ldap-admin main.go
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -o go-ldap-admin main.go

lint:
env GOGC=25 golangci-lint run --fix -j 8 -v ./...
Loading