Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems Awkward #6

Open
mchirico opened this issue Sep 9, 2018 · 0 comments
Open

Seems Awkward #6

mchirico opened this issue Sep 9, 2018 · 0 comments
Assignees

Comments

@mchirico
Copy link
Owner

mchirico commented Sep 9, 2018

Embedding?

Could this be cleaned up with some type of embedding?

package main

import (
	"fmt"
	"log"
	"os"
)

type Job struct {
	Command string
	*log.Logger
}

func main() {
	fmt.Println("Hello, playground")
	job := &Job{"this", log.New(os.Stderr, "Job: ", log.Ldate)}
	job.Print("sample")

}

Reference:

Notes
Playground

@mchirico mchirico self-assigned this Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant