Skip to content

Seems Awkward  #6

@mchirico

Description

@mchirico

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions