Documentation
¶
Index ¶
- func DumpNodeNoExit(whatever interface{})
- func DumpNodeWithExit(whatever interface{})
- func GetLocalSourcesPath() string
- func SimplifyImportPaths(content string) string
- func StripExtraSPDXLines(content string) string
- func StripImportPaths(content string) string
- func ToJSON(data interface{}) ([]byte, error)
- func ToJSONPretty(data interface{}) ([]byte, error)
- func ToProtoJSON(data interface{}) ([]byte, error)
- func WriteToFile(path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpNodeNoExit ¶ added in v0.2.1
func DumpNodeNoExit(whatever interface{})
DumpNodeNoExit prints a formatted JSON representation of the provided interface without exiting the program. This function is primarily used for debugging purposes.
func DumpNodeWithExit ¶ added in v0.2.1
func DumpNodeWithExit(whatever interface{})
DumpNodeWithExit prints a formatted JSON representation of the provided interface and exits the program. This function is primarily used for debugging purposes.
func GetLocalSourcesPath ¶ added in v0.2.2
func GetLocalSourcesPath() string
GetLocalSourcesPath returns the absolute path to the local sources directory.
func SimplifyImportPaths ¶ added in v0.2.3
SimplifyImportPaths simplifies the paths in import statements as file will already be present in the directory for future consumption and is rather corrupted for import paths to stay the same.
func StripExtraSPDXLines ¶ added in v0.2.3
StripExtraSPDXLines removes the extra SPDX lines from the content. This is used when passing combined source to the solc compiler as it will complain about the extra SPDX lines.
func StripImportPaths ¶ added in v0.2.3
StripImportPaths removes the import paths entirely from the content.
func ToJSONPretty ¶
ToJSONPretty returns a pretty-printed JSON representation of the provided interface. This function is primarily used for debugging purposes.
func ToProtoJSON ¶
ToProtoJSON converts a Go struct to its JSON representation.
func WriteToFile ¶
WriteToFile writes the provided data byte array to a file at the provided path.
Types ¶
This section is empty.