pkg/environment: Remove some file-based functions
This commit removes certain file-based functions from 'pkg/environment', continuing the migration to entirely remove the package.
This commit is contained in:
parent
39207a1cb5
commit
45540ab253
20 changed files with 52 additions and 120 deletions
|
|
@ -3,6 +3,7 @@ package extras
|
|||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ func (wisski *Prefixes) database(ctx context.Context, server *phpx.Server) (pref
|
|||
func (prefixes *Prefixes) blocked() ([]string, error) {
|
||||
// open the resolver block file
|
||||
// TODO: move this to the distillery
|
||||
file, err := prefixes.Malt.Environment.Open(prefixes.Malt.Config.Paths.ResolverBlocks)
|
||||
file, err := os.Open(prefixes.Malt.Config.Paths.ResolverBlocks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -123,7 +124,7 @@ func (wisski *Prefixes) filePrefixes() (prefixes []string, err error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
file, err := wisski.Malt.Environment.Open(path)
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue