1
hermetic_cc_toolchain/test/cgo/cgo.go
Motiejus Jakštys 73a9ceccfb
revert "Re-license portions of the code to Apache 2.0" (#35)
This (partially) reverts commit dfdb1f2680
2023-04-19 20:23:25 -04:00

18 lines
299 B
Go

// Copyright 2023 Uber Technologies, Inc.
// Licensed under the MIT License
package main
// #include <stdio.h>
// char* hello() { return "hello, world"; }
// void phello() { printf("%s\n", hello()); }
import "C"
func main() {
C.phello()
}
func Chello() string {
return C.GoString(C.hello())
}