package main

import "fmt"

func main() {
	c := &Config{}

	if err := c.Init(80).Run(); err != nil { // <- Method Chain: Init.Run
		fmt.Println(err)
	}
}

type Config struct {
	port int
}

func (c *Config) Init(port int) *Config {
	c.port = port
	return c
}

func (c *Config) Run() error {
	return fmt.Errorf("something went wrong...")
}
