This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index eb976b5..97c4d79 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -22,12 +22,12 @@ include Makefile.cfg | |
export CC = gcc -pthread | |
export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC | |
-export LDLIBS += -lncursesw | |
+export LDLIBS += $(LDFLAGS) -lncursesw -liconv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Newsbeuter <Formula | |
url 'http://www.newsbeuter.org/downloads/newsbeuter-2.4.tar.gz' | |
homepage 'http://www.newsbeuter.org/' | |
md5 '67fd0d44a55e10ed1ba15b197262a35f' | |
depends_on 'stfl' | |
depends_on 'curl' | |
depends_on 'sqlite' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Vehicle struct { | |
speed int | |
} | |
func(v *Vehicle) Speed() int { | |
return v.speed | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Drivable interface { | |
Accelerate(delta uint) | |
Brake(delta uint) | |
Speed() int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Car struct { | |
Vehicle | |
} | |
func(c *Car) Accelerate(delta uint) { | |
c.Vehicle.speed += int(delta) | |
} | |
func(c *Car) Brake(delta uint) { | |
c.Vehicle.speed -= int(delta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Car struct { | |
Vehicle | |
} | |
func(c *Car) Accelerate(delta uint) { | |
c.Vehicle.speed += int(delta) | |
} | |
func(c *Car) Brake(delta uint) { | |
c.Vehicle.speed -= int(delta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Boat struct { | |
Vehicle | |
} | |
func(b *Boat) Accelerate(delta uint) { | |
b.Vehicle.speed += int(delta) | |
} | |
func(b *Boat) Brake(delta uint) { | |
b.Vehicle.speed -= int(delta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Amphibian struct { | |
Car | |
Boat | |
} | |
func NewAmphibian() Drivable { | |
a := new(Amphibian) | |
return a | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vehicle.go:65: Amphibian.Accelerate is ambiguous | |
vehicle.go:65: cannot use a (type *Amphibian) as type Drivable in return argument: | |
*Amphibian does not implement Drivable (missing Accelerate method) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ype Amphibian struct { | |
Car | |
Boat | |
swimming bool | |
} | |
func NewAmphibian() *Amphibian { | |
a := new(Amphibian) | |
a.swimming = false | |
return a |
OlderNewer