mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
feat: update linter config and deprecation notice (#4399)
- Add `gofmt` rewrite-rules to `.golangci.yml` for code formatting consistency. - Update deprecation comment in `gpage.go` to specify removal in version 3.0. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/golangci-lint.yml
vendored
2
.github/workflows/golangci-lint.yml
vendored
@ -36,6 +36,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Golang ${{ matrix.go-version }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
|
||||
@ -196,6 +196,19 @@ formatters:
|
||||
no-lex-order: false
|
||||
gofmt:
|
||||
simplify: true
|
||||
rewrite-rules:
|
||||
- pattern: 'interface{}'
|
||||
replacement: 'any'
|
||||
- pattern: 'reflect.Ptr'
|
||||
replacement: 'reflect.Pointer'
|
||||
- pattern: 'ioutil.ReadAll'
|
||||
replacement: 'io.ReadAll'
|
||||
- pattern: 'ioutil.WriteFile'
|
||||
replacement: 'os.WriteFile'
|
||||
- pattern: 'ioutil.ReadFile'
|
||||
replacement: 'os.ReadFile'
|
||||
- pattern: 'ioutil.NopCloser'
|
||||
replacement: 'io.NopCloser'
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/gogf/gf/v2
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
// Package gpage provides useful paging functionality for web pages.
|
||||
//
|
||||
// Deprecated: wrap this pagination html content in business layer.
|
||||
// Will be removed in version 3.0.
|
||||
package gpage
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user