refactor(blogo,gitea): move Source function to gitea.go

This commit is contained in:
Guz
2025-01-08 11:12:19 -03:00
parent 1b0c84a405
commit e7e3010cde
2 changed files with 5 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ package gitea
import ( import (
"fmt" "fmt"
"io/fs"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
@@ -76,3 +77,7 @@ func New(owner, repo, apiUrl string, opts ...Opts) blogo.Plugin {
func (p *plugin) Name() string { func (p *plugin) Name() string {
return pluginName return pluginName
} }
func (p *plugin) Source() (fs.FS, error) {
return newRepositoryFS(p.owner, p.repo, p.ref, p.client), nil
}

View File

@@ -1,24 +0,0 @@
// Copyright 2025-present Gustavo "Guz" L. de Mello
// Copyright 2025-present The Lored.dev Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package gitea
import (
"io/fs"
)
func (p *plugin) Source() (fs.FS, error) {
return nil, nil
}