testFolder

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

README

Greenbone Logo

testFolder

import "github.com/greenbone/opensight-golang-libraries/pkg/testFolder"

Index

type TestFolder

TestFolder is an interface that provides methods for accessing content and reading files from a test folder. GetContent retrieves the content of a file located at a specified path. It takes a *testing.T object and a string path as parameters. It returns the content of the file as a string.

type TestFolder interface {
    GetContent(t *testing.T, path string) string
    GetReader(t *testing.T, path string) io.Reader
}

func NewTestFolder
func NewTestFolder() TestFolder

NewTestFolder returns a new instance of the TestFolder interface. It creates an instance of the testFolder struct and returns it as a TestFolder.

Generated by gomarkdoc

License

Copyright (C) 2022-2023 [Greenbone AG][Greenbone AG]

Licensed under the GNU General Public License v3.0 or later.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestFolder

type TestFolder interface {
	GetContent(t *testing.T, path string) string
	GetReader(t *testing.T, path string) io.Reader
}

TestFolder is an interface that provides methods for accessing content and reading files from a test folder. GetContent retrieves the content of a file located at a specified path. It takes a *testing.T object and a string path as parameters. It returns the content of the file as a string.

func NewTestFolder

func NewTestFolder() TestFolder

NewTestFolder returns a new instance of the TestFolder interface. It creates an instance of the testFolder struct and returns it as a TestFolder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL