From 3b5e51100a60ab0e133dec8ab06125b30d3e4222 Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Tue, 30 Aug 2016 17:28:04 +0100 Subject: [PATCH] Rename GetDTX() to DTX() (more go-like) Breaks the API :/ doing it sooner rather than later to avoid impacting too many people. Sorry though! --- encoder.go | 2 +- encoder_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/encoder.go b/encoder.go index e43a1f2..3690bc1 100644 --- a/encoder.go +++ b/encoder.go @@ -127,7 +127,7 @@ func (enc *Encoder) UseDTX(use bool) { C.bridge_set_dtx(enc.p, C.int(dtx)) } -func (enc *Encoder) GetDTX() bool { +func (enc *Encoder) DTX() bool { dtx := C.bridge_get_dtx(enc.p) return dtx != 0 } diff --git a/encoder_test.go b/encoder_test.go index bfe99cb..69aa5e1 100644 --- a/encoder_test.go +++ b/encoder_test.go @@ -14,7 +14,7 @@ func TestUseDTX(t *testing.T) { vals := []bool{true, false} for _, dtx := range vals { enc.UseDTX(dtx) - gotv := enc.GetDTX() + gotv := enc.DTX() if gotv != dtx { t.Errorf("Error set dtx: expect dtx=%v, got dtx=%v", dtx, gotv) } -- 2.48.1