fix: build with cgo

This commit is contained in:
Jason Song 2023-04-23 15:18:47 +08:00
parent 35e2ad6c14
commit 14090a9190
No known key found for this signature in database
GPG key ID: 8402EEEE4511A8B5
4 changed files with 19 additions and 1 deletions
go.mod
internal/app/artifactcache

1
go.mod
View file

@ -12,6 +12,7 @@ require (
github.com/go-chi/render v1.0.2
github.com/joho/godotenv v1.5.1
github.com/mattn/go-isatty v0.0.17
github.com/mattn/go-sqlite3 v1.14.9
github.com/nektos/act v0.0.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1

View file

@ -0,0 +1,9 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//go:build cgo
// +build cgo
package artifactcache
import _ "github.com/mattn/go-sqlite3"

View file

@ -0,0 +1,9 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//go:build !cgo
// +build !cgo
package artifactcache
import _ "modernc.org/sqlite"

View file

@ -19,7 +19,6 @@ import (
"github.com/go-chi/chi/v5/middleware"
"github.com/go-chi/render"
log "github.com/sirupsen/logrus"
_ "modernc.org/sqlite"
"xorm.io/builder"
"xorm.io/xorm"
)