Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.53 KB

File metadata and controls

49 lines (30 loc) · 1.53 KB

Greenbone Logo

testFolder

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

Index

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() 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.