Files
mgmt/lang/funcs/core/core.go
James Shubin ed4ee3b58e lang: funcs: Add deploy package with readfile related functions
This adds a readfile function to actually access files from our deploy.
A fun side effect is that we can even access our own code! In general,
it's a good reminder that you should only run trusted code on your own
infrastructure. This also includes a fancy new test case.
2019-07-26 03:38:26 -04:00

34 lines
1.4 KiB
Go

// Mgmt
// Copyright (C) 2013-2019+ James Shubin and the project contributors
// Written by James Shubin <james@shubin.ca> and the project contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package core
import (
// import so the funcs register
_ "github.com/purpleidea/mgmt/lang/funcs/core/datetime"
_ "github.com/purpleidea/mgmt/lang/funcs/core/deploy"
_ "github.com/purpleidea/mgmt/lang/funcs/core/example"
_ "github.com/purpleidea/mgmt/lang/funcs/core/example/nested"
_ "github.com/purpleidea/mgmt/lang/funcs/core/fmt"
_ "github.com/purpleidea/mgmt/lang/funcs/core/math"
_ "github.com/purpleidea/mgmt/lang/funcs/core/os"
_ "github.com/purpleidea/mgmt/lang/funcs/core/regexp"
_ "github.com/purpleidea/mgmt/lang/funcs/core/strings"
_ "github.com/purpleidea/mgmt/lang/funcs/core/sys"
_ "github.com/purpleidea/mgmt/lang/funcs/core/world"
)