Napat / magro

Golang parody of Clang macro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

magro

Go Tracing library parody of C MACRO __LINE__, __FUNCTION__, __FILE__.

Example

import (
    ...
    m "github.com/Napat/magro"
)

func example() {
    fmt.Printf("File fullpath: %s\n", m.FileFullpath())
    fmt.Printf("File: %s\n", m.File())
    fmt.Printf("Function: %s\n", m.Function())
    fmt.Printf("Line: %d\n", m.Line())
    fmt.Printf("Where: %s\n", m.Where())
    fmt.Printf("Info: %s\n", m.Info())
}

About

Golang parody of Clang macro

License:MIT License


Languages

Language:Go 100.0%