From b61faf36d9d724954d25cba981e88112cbbd0ca8 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 27 Jan 2021 23:43:01 +0100 Subject: [PATCH] all: fix main package in examples The package with the main function should always have the name main. This was not the case in three packages. This was silently allowed before, but since a TinyGo change (https://github.com/tinygo-org/tinygo/pull/1592) this now results in a linker failure. Perhaps this should result in a better error message in TinyGo. However, the example code also needs to be fixed, so hence this PR. --- examples/hcsr04/main.go | 2 +- examples/ssd1331/main.go | 2 +- examples/ssd1351/main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/hcsr04/main.go b/examples/hcsr04/main.go index 4115e97c0..191bc0709 100644 --- a/examples/hcsr04/main.go +++ b/examples/hcsr04/main.go @@ -1,4 +1,4 @@ -package hcsr04 +package main import ( "machine" diff --git a/examples/ssd1331/main.go b/examples/ssd1331/main.go index 3eec9087c..40877f83d 100644 --- a/examples/ssd1331/main.go +++ b/examples/ssd1331/main.go @@ -1,4 +1,4 @@ -package ssd1331 +package main import ( "machine" diff --git a/examples/ssd1351/main.go b/examples/ssd1351/main.go index 00099cc72..b1274ad2a 100644 --- a/examples/ssd1351/main.go +++ b/examples/ssd1351/main.go @@ -1,4 +1,4 @@ -package ssd1351 +package main import ( "machine"