diff --git a/appendframeinputtext.go b/appendframeinputtext.go index ac521fd..798cccd 100644 --- a/appendframeinputtext.go +++ b/appendframeinputtext.go @@ -15,7 +15,7 @@ package frameproto // Would append this HTML element: // // -func AppendFrameInputText(p []byte, url string) []byte { +func AppendFrameInputText(p []byte, label string) []byte { const property string = MetaPropertyFrameInputText - return appendMetaPropertyContent(p, property, url) + return appendMetaPropertyContent(p, property, label) } diff --git a/appendframeinputtext_test.go b/appendframeinputtext_test.go index 7de1e02..44a868b 100644 --- a/appendframeinputtext_test.go +++ b/appendframeinputtext_test.go @@ -7,39 +7,39 @@ import ( func TestAppendFrameInputText(t *testing.T) { tests := []struct{ - Version string + Label string Expected string }{ { - Version: "", + Label: "", Expected: ``+"\n", }, { - Version: "something", + Label: "something", Expected: ``+"\n", }, { - Version: "Hello world! 🙂", + Label: "Hello world! 🙂", Expected: ``+"\n", }, { - Version: "enter your username", + Label: "enter your username", Expected: ``+"\n", }, { - Version: "I like to eat, eat, eat, apples and banana", + Label: "I like to eat, eat, eat, apples and banana", Expected: ``+"\n", }, } @@ -50,7 +50,7 @@ func TestAppendFrameInputText(t *testing.T) { var buffer [256]byte var p []byte = buffer[0:0] - p = AppendFrameInputText(p, test.Version) + p = AppendFrameInputText(p, test.Label) expected := test.Expected actual := string(p) @@ -61,7 +61,7 @@ func TestAppendFrameInputText(t *testing.T) { t.Logf("ACTUAL: %s", actual) t.Logf("EXPECTED: %q", expected) t.Logf("ACTUAL: %q", actual) - t.Logf("LABEL: %q", test.Version) + t.Logf("LABEL: %q", test.Label) continue } } @@ -75,7 +75,7 @@ func TestAppendFrameInputText(t *testing.T) { p = append(p, top...) - p = AppendFrameInputText(p, test.Version) + p = AppendFrameInputText(p, test.Label) p = append(p, bottom...) @@ -88,7 +88,7 @@ func TestAppendFrameInputText(t *testing.T) { t.Logf("ACTUAL: %s", actual) t.Logf("EXPECTED: %q", expected) t.Logf("ACTUAL: %q", actual) - t.Logf("LABEL: %q", test.Version) + t.Logf("LABEL: %q", test.Label) continue } }